Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/gemini-issue-automated-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,25 @@ name: Gemini Automated Issue Triage
on:
issues:
types: [opened, reopened]
issue_comment:
types: [created]
workflow_dispatch:
inputs:
issue_number:
description: 'issue number to triage'
required: true
type: number

jobs:
triage-issue:
if: >
github.event_name == 'issues' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'issue_comment' &&
contains(github.event.comment.body, '@gemini-cli /triage') &&
(github.event.comment.author_association == 'OWNER' ||
github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'COLLABORATOR'))
timeout-minutes: 5
permissions:
issues: write
Expand Down
26 changes: 14 additions & 12 deletions docs/issue-triage.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,30 @@ graph TD
A[Issue Opened or Reopened]
B[Scheduled Cron Job]
C[Manual Dispatch]
D[Issue Comment with '@gemini-cli /triage' Created]
end

subgraph "Gemini CLI Action"
D[Get Issue Details]
E{Issue needs triage?}
F[Analyze Issue with Gemini]
G[Apply Labels]
E[Get Issue Details]
F{Issue needs triage?}
G[Analyze Issue with Gemini]
H[Apply Labels]
end

A --> D
B --> D
C --> D
A --> E
B --> E
C --> E
D --> E
E -- Yes --> F
F --> G
E -- No --> J((End))
G --> J
E --> F
F -- Yes --> G
G --> H
F -- No --> J((End))
H --> J
```

The two workflows work together to ensure that all new and existing issues are triaged in a timely manner.

1. **Real-Time Triage**: When a new issue is opened or reopened, a GitHub Actions workflow is triggered. This workflow uses the Gemini CLI to analyze the issue and apply the most appropriate labels. This provides immediate feedback and categorization of new issues.
1. **Real-Time Triage**: When a new issue is opened or reopened, an issue comment that contains `@gemini-cli /triage` is created or when a maintainer of the repo dispatch the triage event, a GitHub Actions workflow is triggered. This workflow uses the Gemini CLI to analyze the issue and apply the most appropriate labels. This provides immediate feedback and categorization of new issues.

2. **Scheduled Triage**: To catch any issues that might have been missed by the real-time triage, a scheduled workflow runs every hour. This workflow specifically looks for issues that have no labels or have the `status/needs-triage` label. This ensures that all issues are eventually triaged.

Expand Down
16 changes: 16 additions & 0 deletions examples/gemini-issue-automated-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,25 @@ name: Gemini Automated Issue Triage
on:
issues:
types: [opened, reopened]
issue_comment:
types: [created]
workflow_dispatch:
inputs:
issue_number:
description: 'issue number to triage'
required: true
type: number

jobs:
triage-issue:
if: >
github.event_name == 'issues' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'issue_comment' &&
contains(github.event.comment.body, '@gemini-cli /triage') &&
(github.event.comment.author_association == 'OWNER' ||
github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'COLLABORATOR'))
timeout-minutes: 5
permissions:
issues: write
Expand Down