-
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 all commits
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: > | ||
This issue has been inactive for a while. If you’re still interested, 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! 🚀 | ||
close-issue-message: > | ||
Closing this issue due to inactivity. If you’re still interested, let us know! Our community is small, and we need contributors like you. | ||
If you provide more details or take the lead on a solution, we’ll be happy to re-open it. Let’s build this together! 🚀 | ||
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! 🚀 |
||
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! 🚀 | ||
close-pr-message: > | ||
Closing this PR due to inactivity. If you’d like to continue, let us know! Our community is small, and we need contributors like you. | ||
Feel free to re-open this PR or submit a new one when you’re ready. Let’s build this together! 🚀 |
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 😆