Skip to content

Commit 38dc231

Browse files
authored
fix(workflows): simplify manual trigger for scheduled triage (#57)
This commit updates the scheduled issue triage workflow to simplify manual runs and align it with the source workflow. The `issue_number` input for the `workflow_dispatch` trigger has been removed. The workflow now automatically identifies all untriaged issues, so a manual issue selection is no longer needed. This allows for manually triggering a triage run for all relevant issues at once. Additionally, the step that posts a failure comment was removed to avoid spamming issues if the scheduled triage fails.
1 parent 84e46e2 commit 38dc231

2 files changed

Lines changed: 4 additions & 22 deletions

File tree

.github/workflows/gemini-issue-scheduled-triage.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ on:
44
schedule:
55
- cron: '0 * * * *' # Runs every hour
66
workflow_dispatch:
7-
inputs:
8-
issue_number:
9-
description: 'issue number to triage'
10-
required: true
11-
type: 'number'
127

138
concurrency:
149
group: '${{ github.workflow }}'
@@ -127,17 +122,3 @@ jobs:
127122
- Do not add comments
128123
- Triage each issue independently
129124
- Reference all shell variables as "${VAR}" (with quotes and braces)
130-
131-
- name: 'Post Issue Triage Failure Comment'
132-
if: |-
133-
${{ failure() && steps.gemini_issue_triage.outcome == 'failure' }}
134-
uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea'
135-
with:
136-
github-token: '${{ steps.generate_token.outputs.token || secrets.GITHUB_TOKEN }}'
137-
script: |
138-
github.rest.issues.createComment({
139-
owner: '${{ github.repository }}'.split('/')[0],
140-
repo: '${{ github.repository }}'.split('/')[1],
141-
issue_number: '${{ github.event.issue.number || github.event.inputs.issue_number }}',
142-
body: 'There is a problem with the Gemini CLI issue triaging. Please check the [action logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details.'
143-
})

workflows/issue-triage/gemini-issue-scheduled-triage.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ jobs:
2626

2727
steps:
2828
- name: 'Checkout repository'
29-
uses: 'actions/checkout@v4'
29+
uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # ratchet:actions/checkout@v4
3030

3131
- name: 'Generate GitHub App Token'
3232
id: 'generate_token'
3333
if: |-
3434
${{ vars.APP_ID }}
35-
uses: 'actions/create-github-app-token@v1'
35+
uses: 'actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e' # ratchet:actions/create-github-app-token@v2
3636
with:
3737
app-id: '${{ vars.APP_ID }}'
3838
private-key: '${{ secrets.APP_PRIVATE_KEY }}'
@@ -67,6 +67,7 @@ jobs:
6767
if: |-
6868
${{ steps.find_issues.outputs.issues_to_triage != '[]' }}
6969
uses: 'google-github-actions/run-gemini-cli@main'
70+
id: 'gemini_issue_triage'
7071
env:
7172
GITHUB_TOKEN: '${{ steps.generate_token.outputs.token }}'
7273
ISSUES_TO_TRIAGE: '${{ steps.find_issues.outputs.issues_to_triage }}'
@@ -95,7 +96,7 @@ jobs:
9596
},
9697
"sandbox": false
9798
}
98-
prompt: |
99+
prompt: |-
99100
## Role
100101
101102
You are an issue triage assistant. Analyze issues and apply

0 commit comments

Comments
 (0)