Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 3, 2025

✅ Successfully implemented automatic issue triage workflow with AI-based labeling:

  • Rewrite workflow to use actions/ai-inference@v1 instead of keyword matching
  • Use actions/github-script@v7 to fetch available labels from the repository
  • Pass issue context and available labels to AI for intelligent classification
  • Apply AI-selected labels to issues
  • Fix AI inference output handling (use steps.inference.outputs.response)
  • Implement batch processing via workflow dispatch for individual issues
  • Split into reusable and calling workflows following repo patterns
  • Remove unused process_unlabeled input parameter
  • Validate workflow syntax (actionlint and yamllint)

Implementation Summary

Split workflow structure (following wp-cli/.github patterns):

  1. reusable-issue-triage.yml: Reusable workflow (NOT synced)

    • Contains all the logic for triaging issues
    • Uses workflow_call trigger
    • Has three jobs: triage-new-issue, triage-unlabeled-issues, triage-single-issue
  2. issue-triage.yml: Calling workflow (synced to all repos)

    • Simple wrapper that calls the reusable workflow
    • Triggers on issues.opened and workflow_dispatch
    • Only passes issue_number input to reusable workflow
    • Gets synced to all wp-cli repositories

Workflow Logic

  • When triggered by issues.opened: Runs triage-new-issue job
  • When triggered by workflow_dispatch with no issue_number: Runs triage-unlabeled-issues job (finds all unlabeled issues and dispatches individual workflows)
  • When triggered by workflow_dispatch with issue_number: Runs triage-single-issue job (processes specific issue)

Key Features

  • AI-powered triage: Uses actions/ai-inference@v1 with custom prompts
  • Dynamic label fetching: Gets available labels from each repository
  • Batch processing: Dispatches individual workflows for unlabeled issues
  • Single issue mode: Can triage specific issues via workflow_dispatch
  • Security hardened: Issue data passed via environment variables
  • Follows repo patterns: Split into reusable + calling workflows like other workflows
Original prompt

This section details on the original issue you should resolve

<issue_title>Add workflow for triaging issues</issue_title>
<issue_description>Would be nice to automatically apply the most appropriate labels given the context.

Examples / resources:

This should run whenever a new issues is created, but should also be able to be dispatched manually (where it would find all open issues without a label and trigger the workflow for those)</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add workflow for triaging issues Add automatic issue triage workflow with content-based labeling Nov 3, 2025
Copilot AI requested a review from swissspidy November 3, 2025 14:49
@wojsmol

This comment was marked as resolved.

@swissspidy

This comment was marked as resolved.

This comment was marked as resolved.

Copilot AI changed the title Add automatic issue triage workflow with content-based labeling Add automatic issue triage workflow with AI-based labeling Nov 3, 2025
@wojsmol

This comment was marked as resolved.

@wojsmol

This comment was marked as resolved.

@swissspidy

This comment was marked as resolved.

@swissspidy

This comment was marked as resolved.

This comment was marked as resolved.

@swissspidy swissspidy requested a review from Copilot November 3, 2025 20:10

This comment was marked as resolved.

@swissspidy

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

Co-authored-by: Copilot <[email protected]>
@swissspidy swissspidy marked this pull request as ready for review November 3, 2025 20:48
@swissspidy swissspidy requested a review from a team as a code owner November 3, 2025 20:48
@schlessera schlessera merged commit aa33bb4 into main Dec 12, 2025
7 checks passed
@schlessera schlessera deleted the copilot/fix-1570774-181716041-20411eca-34f5-409a-a217-dd2c5535347a branch December 12, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add workflow for triaging issues

4 participants