diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000000..7c42796d54 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -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! diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000000..95710b013f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -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! diff --git a/.github/workflows/remove-needs-info-on-response.yml b/.github/workflows/remove-needs-info-on-response.yml new file mode 100644 index 0000000000..768e7685d9 --- /dev/null +++ b/.github/workflows/remove-needs-info-on-response.yml @@ -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!" diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml new file mode 100644 index 0000000000..523dbb8c64 --- /dev/null +++ b/.github/workflows/stale-issues.yml @@ -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" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9fa7fd9cc0..b87c44a493 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,6 +12,7 @@ Thank you for your interest in contributing to the Sanity Plugins monorepo! This - [Adding a New Plugin](#adding-a-new-plugin) - [Plugin Ownership Model](#plugin-ownership-model) - [Publishing Packages](#publishing-packages) +- [Issue Follow-Ups](#issue-follow-ups) - [Commit Guidelines](#commit-guidelines) ## Development Setup @@ -411,6 +412,27 @@ This creates a changeset file in `.changeset/` that should be committed with you 2. The release workflow automatically creates a **"Version Packages"** PR that bumps versions and updates changelogs 3. When the "Version Packages" PR is merged, packages are automatically published to npm with provenance +## Issue Follow-Ups + +We're grateful for every issue you report and value your contributions to making Sanity plugins better. To help us manage the community's needs effectively, we use an automated follow-up process for issues where we need additional information from you. + +### If we need more details + +When we need more context or clarification, a team member will add the `needs-more-info` label and leave a comment explaining what would be helpful. Here's what happens next: + +- **After 10 days**: If we haven't received the information, you'll get a friendly automated reminder, and we'll add a `stale-warned` label to help us track the follow-up +- **After 14 days total**: If we still haven't heard back, the issue will be automatically closed to keep our tracker organized + +**Please don't worry** - this isn't permanent! You're always welcome to reopen the issue or create a new one when you have the information ready. We understand that life gets busy and sometimes issues become less relevant over time. + +### If you respond + +As soon as you comment with the requested information, both labels are automatically removed, you'll receive a thank you message, and your issue moves back into our active review queue. + +### Need more time? + +If you need more time to gather information, just leave a quick comment letting us know - even a simple "I'm working on this" will reset the timer and keep your issue active. + ## Commit Guidelines - Write clear, descriptive commit messages