-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
302241e
commit fe1f732
Showing
2 changed files
with
21 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
name: Greetings | ||
|
||
on: [pull_request_target, issues] | ||
on: | ||
issues: | ||
types: [opened] | ||
pull_request_target: | ||
types: [opened] | ||
|
||
jobs: | ||
greeting: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/first-interaction@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
issue-message: "Hello @${{ github.actor }}, 👋 Thank you for creating your first issue in our repository. We appreciate your contribution!" | ||
pr-message: "Hello @${{ github.actor }}, 👋 Thank you for creating your first pull request in our repository. We appreciate your contribution!" | ||
- name: Send greeting for issues | ||
if: github.event_name == 'issues' | ||
run: | | ||
curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments \ | ||
-d '{"body": "Hello @${{ github.actor }}, 👋 Thank you for creating an issue in our repository. We appreciate your contribution!"}' | ||
- name: Send greeting for pull requests | ||
if: github.event_name == 'pull_request_target' | ||
run: | | ||
curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \ | ||
-d '{"body": "Hello @${{ github.actor }}, 👋 Thank you for creating a pull request in our repository. We appreciate your contribution!"}' | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: Labeler | ||
on: [pull_request_target] | ||
on: [pull_request_target, issues] | ||
|
||
jobs: | ||
label: | ||
|