DEV Community

loading...
Cover image for You Contribute You Rock - (Submission)

You Contribute You Rock - (Submission)

theshubham99 profile image Prathamesh Sahasrabhojane ✔️ Updated on ・2 min read

Hey there folks 👋

This is a summary of my previous 3 weeks that I spent on github actions. As I wrote in the previous blog, I am developing a Contributor Appreciator Action called YouRock.

This is my submission for #️⃣actionsHackathon

Aim and Impact

This action will help #️⃣ maintainers to improve the outreach and Public Relations.

What it do?

Sends out a personalized email appreciating the contribution with some badges and Image Processed Personalized Material

Submission Categories:

#️⃣Maintainer Must-Haves, #️⃣Wacky Wildcards.

What it looks like?

How it works?

When a user contributes to a particular repository, the YouRock action gets triggered and performs the following steps:

  1. User's public data gets fetched from Github graphQL API.
  2. A small image processing task gets executed. It pastes the mask image by doing facial recognition using OpenCV.

Alt Text

(In this case the mask image is given below ⬇️ But it can be changed easily according to the organizations need)
Alt Text

  1. Then a mini mailing server sends the email from your given email.

How to test?

Alt Text

  1. Just open a new issue on this YouRock Repo.
  2. You'll receive a personalized email (email account linked to your Github)

How to use it in your repository?

Driver Code (Update) -

  • Check out the Rock.py file to know how it works.

Code -

  1. Fetching Users Data. [JOB - start_sending]
- uses: octokit/graphql-action@v2.x
        id: start_sending
        with:
          query: |
            query send($login:String!){
              user(login:$login){
                  login
                  avatarUrl
                  email
                }
              }
          login: ${{ github.actor }}
  1. Run Python Script [JOB - Send Email]
- name: Send Email
        run: |
          python ./Rock.py '${{steps.start_sending.outputs.data}}' '${{github.repository}}'

Actual Workflow file

Stack

  1. Github Actions running on ubuntu.
  2. Python.
  3. open-cv.
  4. Pillow.
  5. GraphQL API.

Repository - https://github.com/TheShubham99/YouRock/

Discussion (0)

pic
Editor guide