-
Notifications
You must be signed in to change notification settings - Fork 0
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
2a8efde
commit c8b746d
Showing
1 changed file
with
51 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Displaying commenter's name under new issue | ||
|
||
on: | ||
workflow_dispatch: | ||
issues: | ||
types: [opened, edited, deleted] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
Comment: | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: "Step 1 - Dumping Github Event Payload" | ||
run: echo '${{ toJSON(github.event) }}' | jq | ||
shell: bash | ||
- name: "Step 2 - Print type of event - open vs edit" | ||
run: echo $(expr ${{ github.event.action }} = 'edited') | ||
shell: bash | ||
- name: "Create a comment on newly opened Issue" | ||
if: ${{ github.event.action == 'opened' }} | ||
uses: peter-evans/create-or-update-comment@v2 | ||
with: | ||
issue-number: ${{ github.event.issue.number }} | ||
body: | | ||
Thanks **@${{ github.event.issue.user.login }}** for opening this issue. We will take a look into it ASAP. | ||
- Please make sure enough details are provided. :sparkles: | ||
- Credits: Created by [create-or-update-comment][1] | ||
[1]: https://github.com/peter-evans/create-or-update-comment | ||
reactions: '+1' | ||
|
||
- name: "Create a comment on newly edited Issue title" | ||
if: ${{ github.event.action == 'edited'}} | ||
uses: peter-evans/create-or-update-comment@v2 | ||
with: | ||
issue-number: ${{ github.event.issue.number }} | ||
body: | | ||
Thanks **@${{ github.event.issue.user.login }}** for editing this issue. We will take a look into it ASAP. | ||
- Please make sure the title is descriptive. :sparkles: | ||
- Credits: Created by [create-or-update-comment][1] | ||
[1]: https://github.com/peter-evans/create-or-update-comment | ||
reactions: '+1' | ||
|
||
- name: "Finished checking out the payload" | ||
run: echo 'Thank you. Thats all.' | ||
shell: bash | ||
|
||
|