-
Notifications
You must be signed in to change notification settings - Fork 9
chore: add workflow to close stale issues needing more info #882
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
3 commits
Select commit
Hold shift + click to select a range
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,55 @@ | ||
| --- | ||
| name: Bug report | ||
| about: Report something that is not working as expected | ||
| title: '' | ||
| labels: '' | ||
| assignees: '' | ||
| --- | ||
|
|
||
| If you find a security vulnerability, do NOT open an issue. Email [security@sanity.io](mailto:security@sanity.io) instead. | ||
|
|
||
| ## Which plugin is affected? | ||
|
|
||
| Tell us the package name, for example `@sanity/code-input` or `sanity-plugin-asset-source-unsplash`. | ||
|
|
||
| ## Describe the bug | ||
|
|
||
| A clear and concise description of what is not working. | ||
|
|
||
| ## To reproduce | ||
|
|
||
| Steps to reproduce the behavior: | ||
|
|
||
| 1. Go to ... | ||
| 2. Click on ... | ||
| 3. See error | ||
|
|
||
| ## Expected behavior | ||
|
|
||
| A clear and concise description of what you expected to happen. | ||
|
|
||
| ## Screenshots or recordings | ||
|
|
||
| If applicable, add screenshots or recordings to help explain the problem. | ||
|
|
||
| ## Environment | ||
|
|
||
| - Sanity Studio version: | ||
| - Plugin version: | ||
| - Browser: | ||
| - Operating system: | ||
|
|
||
| ## Additional context | ||
|
|
||
| Add any other context about the problem here. | ||
|
|
||
| **Security issue?** | ||
|
|
||
| Any security issues should be submitted directly to [security@sanity.io](mailto:security@sanity.io). In order to determine whether you are dealing with a security issue, ask yourself these two questions: | ||
|
|
||
| - Can I access something that's not mine, or something I shouldn't have access to? | ||
| - Can I disable something for other people? If the answer to either of those two questions are "yes", then you're probably dealing with a security issue. Note that even if you answer "no" to both questions, you may still be dealing with a security issue, so if you're unsure, just email us at [security@sanity.io](mailto:security@sanity.io) | ||
|
|
||
| --- | ||
|
|
||
| **About follow-ups:** If we need additional information to help with your issue, we'll let you know by adding a `needs-more-info` label. You'll have plenty of time to respond (we'll send a friendly reminder after 10 days). If we don't hear back after 14 days total, the issue will be automatically closed to keep things organized, but you're always welcome to reopen it or create a new one when you're ready. We appreciate your contribution to making Sanity plugins better! |
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,31 @@ | ||
| --- | ||
| name: Feature request | ||
| about: Suggest an idea for a plugin or the monorepo | ||
| title: '' | ||
| labels: '' | ||
| assignees: '' | ||
| --- | ||
|
|
||
| ## Which plugin would this affect? | ||
|
|
||
| Tell us the package name, or say if this is a request for the monorepo itself. | ||
|
|
||
| ## Is your feature request related to a problem? | ||
|
|
||
| A clear and concise description of what the problem is. | ||
|
|
||
| ## Describe the solution you'd like | ||
|
|
||
| A clear and concise description of what you want to happen. | ||
|
|
||
| ## Describe alternatives you've considered | ||
|
|
||
| A clear and concise description of any alternative solutions or features you've considered. | ||
|
|
||
| ## Additional context | ||
|
|
||
| Add any other context or screenshots about the feature request here. | ||
|
|
||
| --- | ||
|
|
||
| **About follow-ups:** If we need additional information to help evaluate your feature request, we'll let you know by adding a `needs-more-info` label. You'll have plenty of time to respond (we'll send a friendly reminder after 10 days). If we don't hear back after 14 days total, the issue will be automatically closed to keep things organized, but you're always welcome to reopen it or create a new one when you're ready. We appreciate your contribution to making Sanity plugins better! |
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,42 @@ | ||
| name: Remove needs-more-info Label on Response | ||
|
|
||
| on: | ||
| issue_comment: | ||
| types: [created] | ||
|
|
||
| permissions: | ||
| issues: write | ||
| pull-requests: read | ||
|
|
||
| jobs: | ||
| remove-label: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| # Only run when: | ||
| # - The event is for an issue, not a pull request | ||
| # - The issue has the "needs-more-info" label | ||
| # - The commenter is the original issue author (not someone else) | ||
| # - The commenter is a human (not a bot) | ||
| if: >- | ||
| github.event.issue.pull_request == null | ||
| && contains(github.event.issue.labels.*.name, 'needs-more-info') | ||
| && github.event.comment.user.login == github.event.issue.user.login | ||
| && github.event.comment.user.type != 'Bot' | ||
|
|
||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| ISSUE_NUMBER: ${{ github.event.issue.number }} | ||
| REPO: ${{ github.repository }} | ||
|
|
||
| steps: | ||
| - name: Remove labels | ||
| run: | | ||
| gh issue edit "$ISSUE_NUMBER" --remove-label "needs-more-info" --repo "$REPO" | ||
|
|
||
| # Remove stale-warned if present (user may have responded after receiving the warning) | ||
| gh issue edit "$ISSUE_NUMBER" --remove-label "stale-warned" --repo "$REPO" 2>/dev/null || true | ||
|
|
||
| - name: Post thank you comment | ||
| run: | | ||
| gh issue comment "$ISSUE_NUMBER" --repo "$REPO" --body \ | ||
| "Hi there, thanks for providing the additional information! We've received your update and will review it shortly. We appreciate your help in making Sanity plugins better!" |
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,95 @@ | ||
| name: Close Stale Issues Needing More Info | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "0 0 * * *" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| issues: write | ||
| pull-requests: read | ||
|
|
||
| concurrency: | ||
| group: stale-issues | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| stale: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Mark and close stale issues | ||
| id: stale | ||
| uses: actions/stale@v10 | ||
| with: | ||
| enable-statistics: true | ||
| only-issue-labels: "needs-more-info" | ||
|
|
||
| # 10 days inactive → warning, then 4 more days → closure (14 days total) | ||
| days-before-stale: 10 | ||
| days-before-close: 4 | ||
|
|
||
| # Tracks that warning has been posted | ||
| stale-issue-label: "stale-warned" | ||
|
|
||
| stale-issue-message: > | ||
| Hi there, thanks again for this issue report. We have had a look into it | ||
| and are currently waiting for some more information. If you are able to help by | ||
| providing any further details as requested above that would be a great help. | ||
| If you are no longer experiencing this issue, or aren't able to provide any | ||
| further details, this issue will be closed in another 4 days. | ||
|
|
||
| close-issue-message: > | ||
| Hi there, we really appreciate your report of this issue. We had been | ||
| waiting for some more details to look into this properly. Since we didn't hear | ||
| back, we are going to close this issue at this current time. However, please | ||
| do either reopen or raise another issue if you find this is still causing concern. | ||
| We really thank you for taking the time to help us make Sanity plugins better | ||
| for all users! | ||
|
|
||
| days-before-pr-stale: -1 | ||
| days-before-pr-close: -1 | ||
|
|
||
| # Prevents rate limiting | ||
| operations-per-run: 30 | ||
|
|
||
| # Resets stale state if user responds | ||
| remove-stale-when-updated: true | ||
|
|
||
| - name: Report actions taken | ||
| if: always() | ||
| env: | ||
| STALED_ISSUES: ${{ steps.stale.outputs.staled-issues-prs }} | ||
| CLOSED_ISSUES: ${{ steps.stale.outputs.closed-issues-prs }} | ||
| ISSUE_BASE_URL: ${{ github.server_url }}/${{ github.repository }}/issues | ||
| run: | | ||
| { | ||
| echo "## Stale Issue Workflow Summary" | ||
| echo "" | ||
| echo "**Workflow completed at:** $(date -u)" | ||
| echo "" | ||
| } >> "$GITHUB_STEP_SUMMARY" | ||
|
|
||
| echo "### ⚠️ Warning of Closure (10 days inactive)" >> "$GITHUB_STEP_SUMMARY" | ||
| if [ -z "$STALED_ISSUES" ] || [ "$STALED_ISSUES" = "[]" ]; then | ||
| echo "No issues received warnings in this run." >> "$GITHUB_STEP_SUMMARY" | ||
| else | ||
| echo "$STALED_ISSUES" | jq -r --arg base_url "$ISSUE_BASE_URL" \ | ||
| '.[] | "- [#\(.number)](\($base_url)/\(.number)) - \(.title)"' \ | ||
| >> "$GITHUB_STEP_SUMMARY" | ||
| fi | ||
| echo "" >> "$GITHUB_STEP_SUMMARY" | ||
|
|
||
| echo "### ✅ Closed (14 days inactive)" >> "$GITHUB_STEP_SUMMARY" | ||
| if [ -z "$CLOSED_ISSUES" ] || [ "$CLOSED_ISSUES" = "[]" ]; then | ||
| echo "No issues were closed in this run." >> "$GITHUB_STEP_SUMMARY" | ||
| else | ||
| echo "$CLOSED_ISSUES" | jq -r --arg base_url "$ISSUE_BASE_URL" \ | ||
| '.[] | "- [#\(.number)](\($base_url)/\(.number)) - \(.title)"' \ | ||
| >> "$GITHUB_STEP_SUMMARY" | ||
| fi | ||
| echo "" >> "$GITHUB_STEP_SUMMARY" | ||
|
|
||
| { | ||
| echo "---" | ||
| echo "*Check the workflow logs above for detailed statistics.*" | ||
| } >> "$GITHUB_STEP_SUMMARY" | ||
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
Oops, something went wrong.
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.