Github action greeting
Github action is the great tool to automate the manual stuff for your project.
What
The below action will greet to the contributor who will create first Pull Request and also the first issue.
How?
Create a folder .github/workflows
in the root folder
create a new workflow called greeting.yml
inside the .github/workflows/
directory.
Copy the below code and paste in the greeting.yml
name: Greetings
on: [pull_request_target, issues]
jobs:
greetings:
runs-on: ubuntu-latest
permissions:
issue: write
pull-requests: write
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{secrets.GITHUB_TOKEN}}
issue-message: "We appreciate you pointing us to the problem, and as soon as time allows, we will look into it. Thank you!"
pr-message: "We appreciate you creating your first pull request and look forward to reviewing your future contributions."
Push the file in the main branch and try to create a first issue and first Pull request.
This will send a greeting message in the comment of the PR and issue.
Happy Automation!
Top comments (0)