From da0d1f623c1e4433162d3cdd80f0603cc72656ba Mon Sep 17 00:00:00 2001 From: tidy-dev <75402236+tidy-dev@users.noreply.github.com> Date: Tue, 30 Sep 2025 10:27:30 -0400 Subject: [PATCH 1/7] Add GitHub Actions for issue management Introduces multiple workflow files to automate issue and PR triage, labeling, commenting, and closing. Includes actions for handling invalid issues/PRs, single-word issues, feature requests, stale issues, lack of response, and label management to streamline repository maintenance. --- .github/workflows/close-invalid.yml | 31 +++++++++++++ .../workflows/close-single-word-issues.yml | 44 +++++++++++++++++++ .github/workflows/feature-request-comment.yml | 31 +++++++++++++ .github/workflows/no-response.yml | 32 ++++++++++++++ .github/workflows/on-issue-close.yml | 17 +++++++ .github/workflows/remove-triage-label.yml | 22 ++++++++++ .github/workflows/stale-issues.yml | 20 +++++++++ .github/workflows/triage-issues.yml | 34 ++++++++++++++ .../workflows/unable-to-reproduce-comment.yml | 44 +++++++++++++++++++ 9 files changed, 275 insertions(+) create mode 100644 .github/workflows/close-invalid.yml create mode 100644 .github/workflows/close-single-word-issues.yml create mode 100644 .github/workflows/feature-request-comment.yml create mode 100644 .github/workflows/no-response.yml create mode 100644 .github/workflows/on-issue-close.yml create mode 100644 .github/workflows/remove-triage-label.yml create mode 100644 .github/workflows/stale-issues.yml create mode 100644 .github/workflows/triage-issues.yml create mode 100644 .github/workflows/unable-to-reproduce-comment.yml diff --git a/.github/workflows/close-invalid.yml b/.github/workflows/close-invalid.yml new file mode 100644 index 0000000..075d0f4 --- /dev/null +++ b/.github/workflows/close-invalid.yml @@ -0,0 +1,31 @@ +name: Close issue/PR on adding invalid label + +# **What it does**: This action closes issues that are labeled as invalid in the repo. + +on: + issues: + types: [labeled] + +permissions: + contents: read + issues: write + +jobs: + close-on-adding-invalid-label: + if: + github.repository == 'github/copilot-cli' && github.event.label.name == + 'invalid' + runs-on: ubuntu-latest + + steps: + - name: Close issue + if: ${{ github.event_name == 'issues' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh issue close ${{ github.event.issue.html_url }} + + - name: Close PR + if: ${{ github.event_name == 'pull_request_target' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh pr close ${{ github.event.pull_request.html_url }} diff --git a/.github/workflows/close-single-word-issues.yml b/.github/workflows/close-single-word-issues.yml new file mode 100644 index 0000000..f2ef0da --- /dev/null +++ b/.github/workflows/close-single-word-issues.yml @@ -0,0 +1,44 @@ +name: Close Single-Word Issues + +on: + issues: + types: + - opened + +permissions: + issues: write + +jobs: + close-issue: + runs-on: ubuntu-latest + + steps: + - name: Close Single-Word Issue + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const issueTitle = context.payload.issue.title.trim(); + const isSingleWord = /^\S+$/.test(issueTitle); + + if (isSingleWord) { + const issueNumber = context.payload.issue.number; + const repo = context.repo.repo; + + // Close the issue and add the invalid label + github.rest.issues.update({ + owner: context.repo.owner, + repo: repo, + issue_number: issueNumber, + labels: ['invalid'], + state: 'closed' + }); + + // Comment on the issue + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: repo, + issue_number: issueNumber, + body: `This issue may have been opened accidentally. I'm going to close it now, but feel free to open a new issue with a more descriptive title.` + }); + } diff --git a/.github/workflows/feature-request-comment.yml b/.github/workflows/feature-request-comment.yml new file mode 100644 index 0000000..4bebdb2 --- /dev/null +++ b/.github/workflows/feature-request-comment.yml @@ -0,0 +1,31 @@ +name: Add feature-request comment +on: + issues: + types: + - labeled + +permissions: + issues: write + +jobs: + add-comment-to-feature-request-issues: + if: github.event.label.name == 'feature-request' + runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.issue.number }} + BODY: > + Thank you for your issue! We have categorized it as a feature request, + and it has been added to our backlog. In doing so, **we are not + committing to implementing this feature at this time**, but, we will + consider it for future releases based on community feedback and our own + product roadmap. + + + **If you come across this issue and would like to see it implemented, + please add a thumbs up!** This will help us prioritize the feature. + Please only comment if you have additional information or viewpoints to + contribute. + steps: + - run: gh issue comment "$NUMBER" --body "$BODY" diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml new file mode 100644 index 0000000..44d543d --- /dev/null +++ b/.github/workflows/no-response.yml @@ -0,0 +1,32 @@ +name: No Response + +# Both `issue_comment` and `scheduled` event types are required for this Action +# to work properly. +on: + issue_comment: + types: [created] + schedule: + # Schedule for five minutes after the hour, every hour + - cron: '5 * * * *' + +permissions: + issues: write + +jobs: + noResponse: + runs-on: ubuntu-latest + steps: + - uses: lee-dohm/no-response@v0.5.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + closeComment: > + Thank you for your issue! + + We haven’t gotten a response to our questions above. With only the + information that is currently in the issue, we don’t have enough + information to take action. We’re going to close this but don’t + hesitate to reach out if you have or find the answers we need. If + you answer our questions above, this issue will automatically + reopen. + daysUntilClose: 7 + responseRequiredLabel: more-info-needed diff --git a/.github/workflows/on-issue-close.yml b/.github/workflows/on-issue-close.yml new file mode 100644 index 0000000..e768226 --- /dev/null +++ b/.github/workflows/on-issue-close.yml @@ -0,0 +1,17 @@ +name: Remove triage tab from closed issues +on: + issues: + types: + - closed +jobs: + label_issues: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - run: gh issue edit "$NUMBER" --remove-label "$LABELS" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.issue.number }} + LABELS: triage diff --git a/.github/workflows/remove-triage-label.yml b/.github/workflows/remove-triage-label.yml new file mode 100644 index 0000000..b4834e0 --- /dev/null +++ b/.github/workflows/remove-triage-label.yml @@ -0,0 +1,22 @@ +name: Remove triage label +on: + issues: + types: + - labeled + +permissions: + issues: write + +jobs: + remove-triage-label-from-issues: + if: + github.event.label.name != 'triage' && github.event.label.name != + 'more-info-needed' + runs-on: ubuntu-latest + steps: + - run: gh issue edit "$NUMBER" --remove-label "$LABELS" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.issue.number }} + LABELS: triage diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml new file mode 100644 index 0000000..e3cbec3 --- /dev/null +++ b/.github/workflows/stale-issues.yml @@ -0,0 +1,20 @@ +name: 'Marks stale issues and PRs' +on: + schedule: + - cron: '30 1 * * *' # 1:30 AM UTC + +permissions: + issues: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-label: 'stale, triage' # The label that will be added to the issues when automatically marked as stale + start-date: '2025-01-01T00:00:00Z' # Skip stale action for issues created before it + days-before-stale: 365 + days-before-close: -1 # If -1, the issues nor pull requests will never be closed automatically. + days-before-pr-stale: -1 # If -1, no pull requests will be marked as stale automatically. + exempt-issue-labels: 'never-stale, help wanted, ' # issues labeled as such will be excluded them from being marked as stale diff --git a/.github/workflows/triage-issues.yml b/.github/workflows/triage-issues.yml new file mode 100644 index 0000000..f73bb29 --- /dev/null +++ b/.github/workflows/triage-issues.yml @@ -0,0 +1,34 @@ +name: Label incoming issues +on: + issues: + types: + - reopened + - opened + - unlabeled + +permissions: + issues: write + +jobs: + label_incoming_issues: + runs-on: ubuntu-latest + if: github.event.action == 'opened' || github.event.action == 'reopened' + steps: + - run: gh issue edit "$NUMBER" --add-label "$LABELS" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.issue.number }} + LABELS: triage + label_more_info_issues: + if: + github.event.action == 'unlabeled' && github.event.label.name == + 'more-info-needed' + runs-on: ubuntu-latest + steps: + - run: gh issue edit "$NUMBER" --add-label "$LABELS" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.issue.number }} + LABELS: triage diff --git a/.github/workflows/unable-to-reproduce-comment.yml b/.github/workflows/unable-to-reproduce-comment.yml new file mode 100644 index 0000000..ad6b468 --- /dev/null +++ b/.github/workflows/unable-to-reproduce-comment.yml @@ -0,0 +1,44 @@ +name: Add unable-to-reproduce comment +on: + issues: + types: + - labeled + +permissions: + issues: write + +jobs: + add-comment-to-unable-to-reproduce-issues: + if: github.event.label.name == 'unable-to-reproduce' + runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.issue.number }} + LABELS: more-info-needed + BODY: > + Thank you for your issue! Unfortunately, we are unable to reproduce the + issue you are experiencing. Please provide more information so we can + help you. + + + Here are some tips for writing reproduction steps: + - Step by step instructions accompanied by screenshots or screencasts + are the best. + - Be as specific as possible; include as much detail as you can. + - If not already provided, include: + - the version of Copilot CLI you are using. + - the operating system you are using + - any environment factors you can think of. + - any custom configuration you are using. + - a log file from the day you experienced the issue (find log + files via `~/.copilot/logs`. + - If relevant and can be shared, provide the repository or code you + are using. + - If relevant and can be shared, provide the session files (find session files via `~/.copilot/history-session-state`). + + Note: This is a public repository. Please do not include any sensitive or + private information in your issue. + steps: + - run: gh issue edit "$NUMBER" --add-label "$LABELS" + - run: gh issue comment "$NUMBER" --body "$BODY" From c9420c840e83312de7b9a98c59c2a7102ad22597 Mon Sep 17 00:00:00 2001 From: tidy-dev <75402236+tidy-dev@users.noreply.github.com> Date: Tue, 30 Sep 2025 10:39:34 -0400 Subject: [PATCH 2/7] Update feature-request-comment.yml --- .github/workflows/feature-request-comment.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/feature-request-comment.yml b/.github/workflows/feature-request-comment.yml index 4bebdb2..1b2faae 100644 --- a/.github/workflows/feature-request-comment.yml +++ b/.github/workflows/feature-request-comment.yml @@ -1,4 +1,4 @@ -name: Add feature-request comment +name: Add enhancement comment on: issues: types: @@ -8,15 +8,15 @@ permissions: issues: write jobs: - add-comment-to-feature-request-issues: - if: github.event.label.name == 'feature-request' + add-comment-to-enhancement-issues: + if: github.event.label.name == 'enhancement' runs-on: ubuntu-latest env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_REPO: ${{ github.repository }} NUMBER: ${{ github.event.issue.number }} BODY: > - Thank you for your issue! We have categorized it as a feature request, + Thank you for your issue! We have categorized it as a enhancement, and it has been added to our backlog. In doing so, **we are not committing to implementing this feature at this time**, but, we will consider it for future releases based on community feedback and our own From 4184a4e6657ad15e9980cccdbdd64be952eaeb53 Mon Sep 17 00:00:00 2001 From: tidy-dev <75402236+tidy-dev@users.noreply.github.com> Date: Tue, 30 Sep 2025 10:44:51 -0400 Subject: [PATCH 3/7] Update .github/workflows/stale-issues.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/stale-issues.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml index e3cbec3..3ec537c 100644 --- a/.github/workflows/stale-issues.yml +++ b/.github/workflows/stale-issues.yml @@ -17,4 +17,4 @@ jobs: days-before-stale: 365 days-before-close: -1 # If -1, the issues nor pull requests will never be closed automatically. days-before-pr-stale: -1 # If -1, no pull requests will be marked as stale automatically. - exempt-issue-labels: 'never-stale, help wanted, ' # issues labeled as such will be excluded them from being marked as stale + exempt-issue-labels: 'never-stale, help wanted' # issues labeled as such will be excluded them from being marked as stale From 8b7042c377a1b1ccf3c7dd432181104199a5e16e Mon Sep 17 00:00:00 2001 From: tidy-dev <75402236+tidy-dev@users.noreply.github.com> Date: Tue, 30 Sep 2025 10:45:00 -0400 Subject: [PATCH 4/7] Update .github/workflows/feature-request-comment.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/feature-request-comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/feature-request-comment.yml b/.github/workflows/feature-request-comment.yml index 1b2faae..f347eb6 100644 --- a/.github/workflows/feature-request-comment.yml +++ b/.github/workflows/feature-request-comment.yml @@ -16,7 +16,7 @@ jobs: GH_REPO: ${{ github.repository }} NUMBER: ${{ github.event.issue.number }} BODY: > - Thank you for your issue! We have categorized it as a enhancement, + Thank you for your issue! We have categorized it as an enhancement, and it has been added to our backlog. In doing so, **we are not committing to implementing this feature at this time**, but, we will consider it for future releases based on community feedback and our own From e39b1939bab6834db3b054985f5648c8df560ed7 Mon Sep 17 00:00:00 2001 From: tidy-dev <75402236+tidy-dev@users.noreply.github.com> Date: Tue, 30 Sep 2025 10:46:47 -0400 Subject: [PATCH 5/7] Update close-invalid.yml --- .github/workflows/close-invalid.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/close-invalid.yml b/.github/workflows/close-invalid.yml index 075d0f4..b4cc924 100644 --- a/.github/workflows/close-invalid.yml +++ b/.github/workflows/close-invalid.yml @@ -9,6 +9,7 @@ on: permissions: contents: read issues: write + pull-requests: write jobs: close-on-adding-invalid-label: From cfb43f0cec453f647fffed2028aa3727643bdd6d Mon Sep 17 00:00:00 2001 From: tidy-dev <75402236+tidy-dev@users.noreply.github.com> Date: Tue, 30 Sep 2025 10:57:31 -0400 Subject: [PATCH 6/7] Remove workflows that rely on outside repo? --- .../workflows/close-single-word-issues.yml | 44 ------------------- .github/workflows/no-response.yml | 32 -------------- .github/workflows/stale-issues.yml | 20 --------- 3 files changed, 96 deletions(-) delete mode 100644 .github/workflows/close-single-word-issues.yml delete mode 100644 .github/workflows/no-response.yml delete mode 100644 .github/workflows/stale-issues.yml diff --git a/.github/workflows/close-single-word-issues.yml b/.github/workflows/close-single-word-issues.yml deleted file mode 100644 index f2ef0da..0000000 --- a/.github/workflows/close-single-word-issues.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Close Single-Word Issues - -on: - issues: - types: - - opened - -permissions: - issues: write - -jobs: - close-issue: - runs-on: ubuntu-latest - - steps: - - name: Close Single-Word Issue - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const issueTitle = context.payload.issue.title.trim(); - const isSingleWord = /^\S+$/.test(issueTitle); - - if (isSingleWord) { - const issueNumber = context.payload.issue.number; - const repo = context.repo.repo; - - // Close the issue and add the invalid label - github.rest.issues.update({ - owner: context.repo.owner, - repo: repo, - issue_number: issueNumber, - labels: ['invalid'], - state: 'closed' - }); - - // Comment on the issue - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: repo, - issue_number: issueNumber, - body: `This issue may have been opened accidentally. I'm going to close it now, but feel free to open a new issue with a more descriptive title.` - }); - } diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml deleted file mode 100644 index 44d543d..0000000 --- a/.github/workflows/no-response.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: No Response - -# Both `issue_comment` and `scheduled` event types are required for this Action -# to work properly. -on: - issue_comment: - types: [created] - schedule: - # Schedule for five minutes after the hour, every hour - - cron: '5 * * * *' - -permissions: - issues: write - -jobs: - noResponse: - runs-on: ubuntu-latest - steps: - - uses: lee-dohm/no-response@v0.5.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - closeComment: > - Thank you for your issue! - - We haven’t gotten a response to our questions above. With only the - information that is currently in the issue, we don’t have enough - information to take action. We’re going to close this but don’t - hesitate to reach out if you have or find the answers we need. If - you answer our questions above, this issue will automatically - reopen. - daysUntilClose: 7 - responseRequiredLabel: more-info-needed diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml deleted file mode 100644 index 3ec537c..0000000 --- a/.github/workflows/stale-issues.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: 'Marks stale issues and PRs' -on: - schedule: - - cron: '30 1 * * *' # 1:30 AM UTC - -permissions: - issues: write - -jobs: - stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v9 - with: - stale-issue-label: 'stale, triage' # The label that will be added to the issues when automatically marked as stale - start-date: '2025-01-01T00:00:00Z' # Skip stale action for issues created before it - days-before-stale: 365 - days-before-close: -1 # If -1, the issues nor pull requests will never be closed automatically. - days-before-pr-stale: -1 # If -1, no pull requests will be marked as stale automatically. - exempt-issue-labels: 'never-stale, help wanted' # issues labeled as such will be excluded them from being marked as stale From df5bc5bffdb79145437f3f37f312a3c9ff67d1ad Mon Sep 17 00:00:00 2001 From: tidy-dev <75402236+tidy-dev@users.noreply.github.com> Date: Tue, 30 Sep 2025 11:05:38 -0400 Subject: [PATCH 7/7] Revert "Remove workflows that rely on outside repo?" This reverts commit cfb43f0cec453f647fffed2028aa3727643bdd6d. --- .../workflows/close-single-word-issues.yml | 44 +++++++++++++++++++ .github/workflows/no-response.yml | 32 ++++++++++++++ .github/workflows/stale-issues.yml | 20 +++++++++ 3 files changed, 96 insertions(+) create mode 100644 .github/workflows/close-single-word-issues.yml create mode 100644 .github/workflows/no-response.yml create mode 100644 .github/workflows/stale-issues.yml diff --git a/.github/workflows/close-single-word-issues.yml b/.github/workflows/close-single-word-issues.yml new file mode 100644 index 0000000..f2ef0da --- /dev/null +++ b/.github/workflows/close-single-word-issues.yml @@ -0,0 +1,44 @@ +name: Close Single-Word Issues + +on: + issues: + types: + - opened + +permissions: + issues: write + +jobs: + close-issue: + runs-on: ubuntu-latest + + steps: + - name: Close Single-Word Issue + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const issueTitle = context.payload.issue.title.trim(); + const isSingleWord = /^\S+$/.test(issueTitle); + + if (isSingleWord) { + const issueNumber = context.payload.issue.number; + const repo = context.repo.repo; + + // Close the issue and add the invalid label + github.rest.issues.update({ + owner: context.repo.owner, + repo: repo, + issue_number: issueNumber, + labels: ['invalid'], + state: 'closed' + }); + + // Comment on the issue + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: repo, + issue_number: issueNumber, + body: `This issue may have been opened accidentally. I'm going to close it now, but feel free to open a new issue with a more descriptive title.` + }); + } diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml new file mode 100644 index 0000000..44d543d --- /dev/null +++ b/.github/workflows/no-response.yml @@ -0,0 +1,32 @@ +name: No Response + +# Both `issue_comment` and `scheduled` event types are required for this Action +# to work properly. +on: + issue_comment: + types: [created] + schedule: + # Schedule for five minutes after the hour, every hour + - cron: '5 * * * *' + +permissions: + issues: write + +jobs: + noResponse: + runs-on: ubuntu-latest + steps: + - uses: lee-dohm/no-response@v0.5.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + closeComment: > + Thank you for your issue! + + We haven’t gotten a response to our questions above. With only the + information that is currently in the issue, we don’t have enough + information to take action. We’re going to close this but don’t + hesitate to reach out if you have or find the answers we need. If + you answer our questions above, this issue will automatically + reopen. + daysUntilClose: 7 + responseRequiredLabel: more-info-needed diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml new file mode 100644 index 0000000..3ec537c --- /dev/null +++ b/.github/workflows/stale-issues.yml @@ -0,0 +1,20 @@ +name: 'Marks stale issues and PRs' +on: + schedule: + - cron: '30 1 * * *' # 1:30 AM UTC + +permissions: + issues: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-label: 'stale, triage' # The label that will be added to the issues when automatically marked as stale + start-date: '2025-01-01T00:00:00Z' # Skip stale action for issues created before it + days-before-stale: 365 + days-before-close: -1 # If -1, the issues nor pull requests will never be closed automatically. + days-before-pr-stale: -1 # If -1, no pull requests will be marked as stale automatically. + exempt-issue-labels: 'never-stale, help wanted' # issues labeled as such will be excluded them from being marked as stale