-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update action labels * Update action labels
- Loading branch information
1 parent
ec14102
commit a32a671
Showing
5 changed files
with
152 additions
and
30 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,32 @@ | ||
name: Issue Closed | ||
|
||
on: | ||
issues: | ||
types: [closed] | ||
|
||
permissions: | ||
issues: write | ||
|
||
jobs: | ||
cleanup-labels: | ||
runs-on: ubuntu-latest | ||
if: ${{ (contains(github.event.issue.labels.*.name, 'pending-community-response') || contains(github.event.issue.labels.*.name, 'pending-maintainer-response') || contains(github.event.issue.labels.*.name, 'closing soon') || contains(github.event.issue.labels.*.name, 'pending-release')|| contains(github.event.issue.labels.*.name, 'pending-triage')) }} | ||
steps: | ||
- name: remove unnecessary labels after closing | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ISSUE_NUMBER: ${{ github.event.issue.number }} | ||
REPOSITORY_NAME: ${{ github.event.repository.full_name }} | ||
run: | | ||
gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --remove-label "closing soon" --remove-label "pending-community-response" --remove-label "pending-maintainer-response" --remove-label "pending-release" --remove-label "pending-triage" | ||
comment-visibility-warning: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: aws-actions/closed-issue-message@36b7048ea77bb834d16e7a7c5b5471ac767a4ca1 # v1 | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
message: | | ||
This issue is now closed. Comments on closed issues are hard for our team to see. | ||
If you need more assistance, please open a new issue that references this one. |
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,46 @@ | ||
name: Issue Comment | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
notify: | ||
runs-on: ubuntu-latest | ||
permissions: {} | ||
if: ${{ !github.event.issue.pull_request }} | ||
steps: | ||
- name: Run webhook curl command | ||
env: | ||
WEBHOOK_URL: ${{ secrets.SLACK_COMMENT_WEBHOOK_URL }} | ||
BODY: ${{ toJson(github.event.comment.body) }} | ||
COMMENT_URL: ${{ github.event.comment.html_url }} | ||
USER: ${{ github.event.comment.user.login }} | ||
shell: bash | ||
run: echo $BODY | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"body":"{}", "issue":"'$COMMENT_URL'", "user":"'$USER'"}' | ||
|
||
adjust-labels: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ISSUE_NUMBER: ${{ github.event.issue.number }} | ||
REPOSITORY_NAME: ${{ github.event.repository.full_name }} | ||
steps: | ||
- name: remove pending-community-response when new comment received | ||
if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) && !github.event.issue.pull_request }} | ||
shell: bash | ||
run: | | ||
gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --remove-label "pending-community-response" | ||
- name: add pending-maintainer-response when new community comment received | ||
if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) }} | ||
shell: bash | ||
run: | | ||
gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --add-label "pending-maintainer-response" | ||
- name: remove pending-maintainer-response when new owner/member comment received | ||
if: ${{ contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) }} | ||
shell: bash | ||
run: | | ||
gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --remove-label "pending-maintainer-response" | ||
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,20 @@ | ||
name: Issue Labeled | ||
on: | ||
issues: | ||
types: [labeled] | ||
|
||
jobs: | ||
remove-pending-triage-label: | ||
runs-on: ubuntu-latest | ||
if: ${{ contains(fromJSON('["question", "bug", "feature-request"]'), github.event.label.name) }} | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Remove the pending-triage label | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ISSUE_NUMBER: ${{ github.event.issue.number }} | ||
REPOSITORY_NAME: ${{ github.event.repository.full_name }} | ||
run: | | ||
gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --remove-label "pending-triage" |
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,54 @@ | ||
name: Issue Opened | ||
on: | ||
issues: | ||
types: [opened] | ||
|
||
jobs: | ||
notify: | ||
runs-on: ubuntu-latest | ||
permissions: {} | ||
if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.issue.author_association) }} | ||
steps: | ||
- name: Run webhook curl command | ||
env: | ||
WEBHOOK_URL: ${{ secrets.SLACK_ISSUE_WEBHOOK_URL }} | ||
ISSUE: ${{toJson(github.event.issue.title)}} | ||
ISSUE_URL: ${{github.event.issue.html_url}} | ||
USER: ${{github.event.issue.user.login}} | ||
shell: bash | ||
run: echo $ISSUE | sed 's/[^a-zA-Z0-9 &().,:]//g' | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"issue":"{}", "issueUrl":"'$ISSUE_URL'", "user":"'$USER'"}' | ||
|
||
add-issue-opened-labels: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ISSUE_NUMBER: ${{ github.event.issue.number }} | ||
REPOSITORY_NAME: ${{ github.event.repository.full_name }} | ||
steps: | ||
- name: Add the pending-triage label | ||
shell: bash | ||
run: | | ||
gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --add-label "pending-triage" | ||
- name: Add the pending-maintainer-response label | ||
if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.issue.author_association) }} | ||
shell: bash | ||
run: | | ||
gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --add-label "pending-maintainer-response" | ||
|
||
maintainer-opened: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
if: ${{ contains(fromJSON('["MEMBER", "OWNER"]'), github.event.issue.author_association) }} | ||
steps: | ||
- name: Post comment if maintainer opened. | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ISSUE_NUMBER: ${{ github.event.issue.number }} | ||
REPOSITORY_NAME: ${{ github.event.repository.full_name }} | ||
run: | | ||
gh issue comment $ISSUE_NUMBER --repo $REPOSITORY_NAME -b "This issue was opened by a maintainer of this repository; updates will be posted here. If you are also experiencing this issue, please comment here with any relevant information so that we're aware and can prioritize accordingly." |
This file was deleted.
Oops, something went wrong.