-
Notifications
You must be signed in to change notification settings - Fork 1.2k
chore: Add GitHub actions to automate our issues workflow #2521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
74bf3b5
add github actions to automate our github issue workflow
mingkun2020 9f53efd
reformat
mingkun2020 fc82e1d
update name format
mingkun2020 1aed4d5
Merge branch 'develop' into github-auto
mgrandis 94113eb
update response message to be more precise
mingkun2020 567386d
Merge branch 'github-auto' of https://github.com/mingkun2020/aws-sam-…
mingkun2020 62cbf59
Merge branch 'develop' into github-auto
mgrandis 8f19d8e
Merge branch 'develop' into github-auto
mgrandis 4cab60f
Merge branch 'develop' into github-auto
mingkun2020 8cff2e7
updated with the correct sam bot login name
mingkun2020 039b490
updated with the correct token name
mingkun2020 766488a
updated label name and bot name
mingkun2020 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,53 @@ | ||
| name: Close stale issues | ||
|
|
||
| # Controls when the action will run. | ||
| on: | ||
| schedule: | ||
| # Uses UTC so it runs at 10PM PDT | ||
| - cron: "0 6 * * *" | ||
|
|
||
| jobs: | ||
| cleanup: | ||
| runs-on: ubuntu-latest | ||
| name: Stale issue job | ||
| steps: | ||
| - uses: aws-actions/stale-issue-cleanup@v3 | ||
| with: | ||
| issue-types: issues | ||
|
|
||
| # Setting messages to an empty string will cause the automation to skip | ||
| # that category | ||
| ancient-issue-message: | | ||
| This issue has not received any attention in 1 year. | ||
| If you want to keep this issue open, please leave a comment below and auto-close will be canceled. | ||
| stale-issue-message: | | ||
| This issue has not received a response in 14 days. | ||
| If you want to keep this issue open, please leave a comment below and auto-close will be canceled. | ||
| stale-pr-message: | | ||
| This PR has not received a response in 14 days. | ||
| If you want to keep this issue open, please leave a comment below and auto-close will be canceled. | ||
|
|
||
| # These labels are required | ||
| stale-issue-label: blocked/close-if-inactive | ||
| exempt-issue-labels: no-autoclose, stage/needs-attention | ||
| stale-pr-label: blocked/close-if-inactive | ||
| exempt-pr-labels: no-autoclose, type/feature | ||
| response-requested-label: blocked/more-info-needed | ||
|
|
||
| # Don't set this to not apply a label when closing issues | ||
| closed-for-staleness-label: stage/closed-for-inactivity | ||
|
|
||
| # Issue timing | ||
| days-before-stale: 14 | ||
| days-before-close: 7 | ||
| days-before-ancient: 365 | ||
|
|
||
| # If you don't want to mark a issue as being ancient based on a | ||
| # threshold of "upvotes", you can set this here. An "upvote" is | ||
| # the total number of +1, heart, hooray, and rocket reactions | ||
| # on an issue. | ||
| minimum-upvotes-to-exempt: 10 | ||
|
|
||
| # need a repo scope token here to make this action can trigger other github actions | ||
| repo-token: ${{ secrets.STALE_BOT_PERSONAL_TOKEN }} | ||
|
|
||
This file contains hidden or 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,18 @@ | ||
| name: Closed issue message | ||
|
|
||
| on: | ||
| issues: | ||
| types: [ closed ] | ||
| jobs: | ||
| auto_comment: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: aws-actions/closed-issue-message@v1 | ||
| with: | ||
| # These inputs are both required | ||
| repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
| message: | | ||
| ### ⚠️COMMENT VISIBILITY WARNING⚠️ | ||
| Comments on closed issues are hard for our team to see. | ||
| If you need more assistance, please either tag a team member or open a new issue that references this one. | ||
| If you wish to keep having a conversation with other community members under this issue feel free to do so. |
This file contains hidden or 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,22 @@ | ||
| name: Add need attention label | ||
|
|
||
| on: | ||
| issue_comment: | ||
| types: [created, edited] | ||
|
|
||
| jobs: | ||
| apply-label: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/github-script@v3 | ||
| # the login of our bot called 'sam-cli-bot' | ||
| if: github.event.sender.login != 'aws-sam-cli-stale-bot' | ||
| with: | ||
| github-token: ${{secrets.GITHUB_TOKEN}} | ||
| script: | | ||
| github.issues.addLabels({ | ||
| issue_number: context.issue.number, | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| labels: ['stage/needs-attention'] | ||
| }) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.