-
Notifications
You must be signed in to change notification settings - Fork 69
Automatically Add new Label to Newly Created Issues and Close Inactive Issues and PRs After a Certain Period #942
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Close inactive issues and PRs | ||
on: | ||
schedule: | ||
- cron: "30 1 * * *" | ||
workflow_dispatch: | ||
permissions: read-all | ||
jobs: | ||
close-issues: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9 | ||
with: | ||
only-labels: "status: waiting-for-feedback" # only consider issues and PRs with this label | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This part checks for issues and PRs that are labeled with |
||
days-before-stale: 30 # 1 month | ||
days-before-close: 60 # 2 months after being stale | ||
stale-issue-label: "status: stale" | ||
stale-pr-label: "status: stale" | ||
Comment on lines
+19
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This part of the code checks issues and PRs in a stale state using this label. |
||
stale-issue-message: > | ||
If you would like us to be able to process this issue, please provide the requested information. | ||
|
||
If the information is not provided within the next 2 months, we will be unable to proceed and this issue will be closed. | ||
close-issue-message: > | ||
Closing due to lack of requested feedback. | ||
|
||
If you would like to proceed with your contribution, please provide the requested information and we will re-open this issue. | ||
stale-pr-message: > | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR has been inactive for a while. If you’re still working on it, let us know how we can help! Our community is small, and we need contributors like you. If we don’t hear back, we may close it, but you’re always welcome to reopen it. Let’s build this together! 🚀 |
||
If you would like us to be able to process this pull request, please provide the requested information or make the requested changes. | ||
If the information is not provided or the requested changes are not made within the next 2 months, we will be unable to proceed and this pull request will be closed. | ||
close-pr-message: > | ||
Closing due to lack of requested feedback. | ||
|
||
If you would like to proceed with your contribution, please provide the requested information or make the requested changes, and we will re-open this pull request. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Add label to opened issues | ||
on: | ||
issues: | ||
types: | ||
- opened | ||
permissions: read-all | ||
jobs: | ||
label_issues: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 | ||
with: | ||
script: | | ||
const issue = await github.rest.issues.get({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
}); | ||
const originalLabels = issue.data.labels.map(l => l.name); | ||
const statusLabels = originalLabels.filter(l => l.startsWith("status: ")); | ||
if (statusLabels.length === 0) { | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ["status: new"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This part of the workflow automatically applies the |
||
}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The messages imply that the Baremaps community provided a feedback and will do the actual work. What about encouraging ownership? See my suggestions below for the messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds like a great idea.
In fact, the previous messages were from JUnit5, but the revised messages feel more encouraging. 💪🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 273a92d !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I guess that JUnit does not need to build a community anymore 😆