You Contribute You Rock - (Submission)
Prathamesh Sahasrabhojane ✔️
Posted on August 31, 2020
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:
- User's public data gets fetched from
Github graphQL API
. - A small image processing task gets executed. It pastes the
mask
image by doing facial recognition usingOpenCV
.
(In this case the mask image is given below ⬇️ But it can be changed easily according to the organizations need)
- Then a mini mailing server sends the email from your given email.
How to test?
- Just open a new issue on this YouRock Repo.
- You'll receive a personalized email (email account linked to your Github)
How to use it in your repository?
- Yes, you can use it in your organization or even for your personal repository.
- here is a detailed guide for that.
Driver Code (Update) -
- Check out the Rock.py file to know how it works.
Code -
- 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 }}
- Run Python Script [JOB - Send Email]
- name: Send Email
run: |
python ./Rock.py '${{steps.start_sending.outputs.data}}' '${{github.repository}}'
Actual Workflow file
Stack
- Github Actions running on ubuntu.
- Python.
- open-cv.
- Pillow.
- GraphQL API.
Repository - https://github.com/TheShubham99/YouRock/
Posted on August 31, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.