Skip to content

Conversation

@kenjpais
Copy link

@kenjpais kenjpais commented Nov 3, 2025

AI Issue Triage Workflow

This workflow uses AI to assess and triage GitHub issues for the OKD project, improving triage efficiency and issue quality.

Overview

The AI Issue Triage workflow evaluates issues with the triage/needs-triage label using OpenAI GPT-4o-mini. It checks completeness and clarity for bugs and feature requests, posts assessments, and optionally sends Slack notifications.

How It Works

  1. Trigger: Runs when issues are opened, reopened, edited, or labeled, but only if the issue has the triage/needs-triage label.
  2. AI Assessment: The github/ai-assessment-comment-labeler action analyzes the issue using prompts tailored to issue type.
  3. Label Mapping: Routes issues to prompts based on labels:
    • kind/bug → Bug triage prompt
    • kind/feature → Enhancement triage prompt
  4. Assessment Comments: Posts AI assessment comments with actionable feedback.
  5. Summary Generation: Creates a workflow summary with assessment details.
  6. Slack Notifications (optional): Sends formatted notifications if SLACK_WEBHOOK_URL is configured.

Components

Workflow File

  • Location: .github/workflows/issue-triage.yml
  • Jobs:
    • ai-triage: Performs AI assessment and posts comments
    • notify-slack: Sends Slack notifications (conditional)

Prompt Files

  • Location: .github/prompts/
  • Files:
    • bug-triage.prompt.yml: Evaluates bug reports for completeness (problem description, reproduction steps, environment info, logs)
    • enhancement-triage.prompt.yml: Evaluates feature requests for use case, proposed solution, value, and scope

Assessment Criteria

Bug Reports are evaluated for:

  • Problem description (what went wrong vs. expected)
  • Reproduction steps
  • Environment information (version, platform, install method)
  • Log output (error messages, diagnostic data)

Feature Requests are evaluated for:

  • Clear use case
  • Proposed solution
  • Value proposition
  • Scope (not too broad/vague)

Configuration

Required Setup

  • GitHub Actions enabled
  • triage/needs-triage label exists
  • kind/bug and kind/feature labels exist (for prompt mapping)
  • Repository access to GitHub's AI models

Optional Setup

  • Slack Integration: Set SLACK_WEBHOOK_URL in repository secrets to enable notifications

Model Configuration

  • Model: openai/gpt-4o-mini
  • Max Tokens: 300 per assessment
  • Prompt Directory: ./.github/prompts
  • Label Mapping: kind/bug,bug-triage.prompt.yml|kind/feature,enhancement-triage.prompt.yml

Workflow Permissions

The workflow requires:

  • issues: write - To post comments and manage labels
  • models: read - To access GitHub's AI models
  • contents: read - To read repository files and prompts

Outputs

  • Assessment Comments: Posted directly on issues with AI-generated feedback
  • Workflow Summary: Available in the Actions run summary
  • Slack Notifications: Formatted messages with issue details and AI assessment (if configured)

This workflow is designed to assist maintainers with initial triage. All AI assessments should be reviewed by human maintainers before taking action on issues.

Linked JIRA Issue OKD-278

- Add AI issue triage workflow using GitHub's AI Assessment Comment Labeler
- Add prompt files for bug report and enhancement triage
- Workflow automatically triages issues labeled with 'triage/needs-triage'
- AI assesses issue quality and applies appropriate labels
- Adapted for OKD/Kubernetes context
- Slack notifications now include BOTH AI triage assessment AND issue summary
- Triage results are passed from ai-triage job to notify-slack job
- Rich formatted Slack message with blocks layout
- Shows: issue details, triage assessment, and AI summary
- Gracefully handles cases when triage doesn't run
- Add 'edited' trigger to re-run triage when issues are updated
- Add 'reopened' trigger for reopened issues
- Ensures AI re-evaluates issues when reporters add more details
- Allows maintainers to re-triage by re-adding labels
@kenjpais kenjpais changed the title Added AI Triage OKD-278 Added AI Triage Nov 3, 2025
kenjpais and others added 30 commits November 4, 2025 21:39
Trying consolidated prompts
Fixed substr issue in notify-slack
Added mirroring workflow to copy existing issues on upstream repo to …
This reverts commit 4b537ef, reversing
changes made to 025b88a.
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.

1 participant