-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
513 move issue comment workflow to its own workflow and modify confer…
…nce builder to run only when conference approved label is added (#514) * add auto respond * add if conditional
- Loading branch information
1 parent
72b952b
commit 3806d8d
Showing
2 changed files
with
47 additions
and
40 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
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,45 @@ | ||
name: Conference AutoResponder | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
|
||
permissions: | ||
issues: write | ||
|
||
jobs: | ||
add_comment: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- name: Add initial comment to the issue | ||
uses: actions/github-script@v6 | ||
if: ${{ github.event.action == 'opened' && startsWith(github.event.issue.title, '[CONFERENCE]') && contains(github.event.issue.labels.*.name, 'conference') }} | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const issueNumber = context.payload.issue.number; | ||
const comment = "Thank you for submitting this issue. A member of the triage team will review the information and followup on this request. There is no code action to be taken."; | ||
await github.issues.createComment({ | ||
...context.repo, | ||
issue_number: issueNumber, | ||
body: comment | ||
}); | ||
- name: Add approved comment | ||
uses: actions/github-script@v6 | ||
if: ${{ github.event.action == 'opened' && startsWith(github.event.issue.title, '[CONFERENCE]') && contains(github.event.issue.labels.*.name, 'conference_accepted') }} | ||
with: | ||
script: | | ||
const issueNumber = context.payload.issue.number; | ||
const comment = "Your conference submission has been accepted. You will shortly see your conference on the website." | ||
await github.issues.createComment({ | ||
...context.repo, | ||
issue_number: issueNumber, | ||
body: comment | ||
}); |