Skip to content

Migrate issue triage workflows to shared workflows#12677

Open
BagToad wants to merge 2 commits intotrunkfrom
kw/use-shared-triage-workflows
Open

Migrate issue triage workflows to shared workflows#12677
BagToad wants to merge 2 commits intotrunkfrom
kw/use-shared-triage-workflows

Conversation

@BagToad
Copy link
Member

@BagToad BagToad commented Feb 13, 2026

Summary

Replaces several local issue triage workflows with calls to shared reusable workflows. This centralizes triage logic so that cli/cli and desktop/desktop use the same underlying automation, making it easier to maintain and evolve.

What changed

New workflow files

  • triage-issues.yml — A single workflow triggered by issue events that calls 9 shared workflows:

    • Label new/reopened issues with needs-triage
    • Re-add needs-triage when more-info-needed is removed
    • Close issues labeled invalid, suspected-spam, or off-topic
    • Close issues with single-word titles
    • Post a backlog comment when enhancement is added
    • Request reproduction steps when unable-to-reproduce is added
    • Remove needs-triage when end-state labels are added (e.g. priority-1, enhancement)
    • Remove needs-triage when an issue is closed
  • triage-scheduled-tasks.yml — Scheduled and event-driven tasks:

    • Hourly: auto-close issues labeled more-info-needed with no response for 14 days
    • Daily: mark stale issues after 30 days of inactivity

Migrated

  • triage.yml — The inline discuss logic (creating internal issues in github/cli) has been replaced with a call to the shared triage-discuss.yml workflow. Same behavior, less code.

Deleted

  • issueauto.yml — Replaced by the shared triage-label-incoming workflow.
  • feature-request-comment.yml — Replaced by the shared triage-enhancement-comment workflow.
  • stale-issues.yml — Replaced by the shared triage-stale-issues workflow (called from triage-scheduled-tasks.yml).

Updated references

  • docs/triage.md — Updated all references to renamed labels (more-info-needed, priority-1/2/3).
  • eval-prompts.yml — Same label rename in spam detection test data.

Behavioral changes

  • needs-triage is now added to all new issues. Previously, issues opened by org members were skipped. The shared workflow labels everything, which is simpler and consistent with how desktop/desktop works.
  • New automated actions that cli/cli didn't have before: closing invalid/spam/single-word/off-topic issues, unable-to-reproduce comments, removing needs-triage on end-state labels or issue close, and no-response auto-close.
  • Stale workflow broadened. Previously only issues with both needs-triage and more-info-needed could go stale. Now all issues (except those labeled keep) can be marked stale after 30 days of inactivity. Custom stale/close messages are replaced with actions/stale defaults.

Not migrated yet

  • Spam detection — Keeping local detect-spam.yml and scripts as-is.
  • PR workflowsprauto.yml and pr-help-wanted.yml will be migrated in a future phase.

@BagToad BagToad marked this pull request as ready for review February 13, 2026 06:43
@BagToad BagToad requested a review from a team as a code owner February 13, 2026 06:43
@BagToad BagToad requested review from babakks and Copilot February 13, 2026 06:43
@BagToad BagToad requested a review from tidy-dev February 13, 2026 06:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request migrates several issue triage workflows from inline implementations to shared reusable workflows hosted in the desktop/gh-cli-and-desktop-shared-workflows repository. The migration centralizes triage automation logic to ensure consistency between cli/cli and desktop/desktop projects.

Changes:

  • Replaced inline issue triage workflows with calls to 9 shared workflows for common triage operations (labeling, closing invalid/spam issues, posting comments, etc.)
  • Migrated the discuss label workflow to use a shared implementation
  • Updated label references from needs-user-input to more-info-needed and from p1/p2/p3 to priority-1/2/3 throughout documentation and workflows
  • Added new scheduled workflow for auto-closing issues with no response after 14 days

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
.github/workflows/triage-issues.yml New centralized workflow calling 9 shared workflows for issue triage automation
.github/workflows/triage-scheduled-tasks.yml New scheduled workflow for hourly no-response auto-close
.github/workflows/triage.yml Refactored to use shared triage-discuss.yml workflow
.github/workflows/issueauto.yml Deleted - replaced by shared triage-label-incoming workflow
.github/workflows/feature-request-comment.yml Deleted - replaced by shared triage-enhancement-comment workflow
.github/workflows/stale-issues.yml Updated label reference from needs-user-input to more-info-needed
docs/triage.md Updated all label references to use new naming convention
.github/workflows/scripts/spam-detection/eval-prompts.yml Updated label reference in test data

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +17 to +19
contents: read
issues: write
pull-requests: write
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The close-invalid job includes 'contents: read' and 'pull-requests: write' permissions, which seem unnecessary for a workflow that only closes invalid issues. Unless the shared workflow triage-close-invalid.yml performs operations on pull requests or needs to read repository contents, these permissions could be removed to follow the principle of least privilege.

Suggested change
contents: read
issues: write
pull-requests: write
issues: write

Copilot uses AI. Check for mistakes.
EOF
jobs:
discuss:
if: github.event.action == 'labeled'
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition should check for the 'discuss' label specifically. The old workflow had if: github.event.action == 'labeled' && github.event.label.name == 'discuss', but the new version only checks for the labeled action. This means the workflow will trigger for ANY label addition, not just the 'discuss' label, which could cause unintended workflow runs and potentially create internal issues for unrelated labels.

Suggested change
if: github.event.action == 'labeled'
if: github.event.action == 'labeled' && github.event.label.name == 'discuss'

Copilot uses AI. Check for mistakes.
Comment on lines +15 to +22
discuss:
if: github.event.action == 'labeled'
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-discuss.yml@main
with:
target_repo: 'github/cli'
cc_team: '@github/cli'
secrets:
discussion_token: ${{ secrets.CLI_DISCUSSION_TRIAGE_TOKEN }}
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow is missing the 'environment: cli-discuss-automation' configuration that was present in the old workflow. This environment is likely required to access the CLI_DISCUSSION_TRIAGE_TOKEN secret. Without it, the workflow may fail to authenticate when creating internal discussion issues.

Copilot uses AI. Check for mistakes.
@awaischaudhary981-oss

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants