forked from fleaflet/flutter_map
-
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.
* Create issues-no-response.yml * Update issues-no-response.yml * Create on-comment-remove-label.yml * Update on-comment-remove-label.yml * clean up * Update issue-comment.yml * Update issue-comment.yml
- Loading branch information
Showing
2 changed files
with
65 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,25 @@ | ||
name: "Daily Maintenance" | ||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
close-issues: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/stale@v5 | ||
with: | ||
days-before-issue-stale: 21 | ||
days-before-issue-close: 7 | ||
stale-issue-label: "stale" | ||
stale-issue-message: "This issue has been marked that it requires additional information or answers to open questions to be able to get resolved. However, there hasn't been any response within the last 3 weeks.\n If this issue still resists, please provide the requested information. This issue will be automatically closed in one week if there is no response." | ||
#close-issue-message: "This issue was closed because it has been inactive another week since being marked as stale." | ||
days-before-pr-stale: -1 | ||
days-before-pr-close: -1 | ||
remove-stale-when-updated: true | ||
any-of-labels: "waiting for user response" | ||
labels-to-remove-when-unstale: "waiting for user response,stale" | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
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,40 @@ | ||
name: "Issue Comment" | ||
on: | ||
issue_comment: | ||
types: [ created ] | ||
|
||
jobs: | ||
remove-waiting-for-user-reponse: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- name: Check labels of issue | ||
id: check_labels | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const { data: issue } = await github.rest.issues.get({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: context.issue.number | ||
}); | ||
const isStale = issue.labels.some(label => label.name === 'stale'); | ||
const waitingResponse = issue.labels.some(label => label.name === 'waiting for user response'); | ||
return !isStale && waitingResponse; | ||
# only remove the label if the issue is not stale, this prevents that this | ||
# action removes the label when the automatic reminder message gets sent. | ||
- name: Remove `waiting for user response` label if exists | ||
if: steps.check_labels.outputs.result == 'true' | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
await github.rest.issues.removeLabel({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: context.issue.number, | ||
name: ["waiting for user response"] | ||
}); |