Skip to content

Commit df1781a

Browse files
authored
Merge branch 'main' into main
2 parents 5ad51f7 + aab8506 commit df1781a

235 files changed

Lines changed: 17325 additions & 4363 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 87 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,79 @@
1-
name: Gemini Automated Issue Triage
1+
name: '🏷️ Gemini Automated Issue Triage'
22

33
on:
44
issues:
5-
types: [opened, reopened]
5+
types:
6+
- 'opened'
7+
- 'reopened'
8+
issue_comment:
9+
types:
10+
- 'created'
11+
workflow_dispatch:
12+
inputs:
13+
issue_number:
14+
description: 'issue number to triage'
15+
required: true
16+
type: 'number'
17+
18+
concurrency:
19+
group: '${{ github.workflow }}-${{ github.event.issue.number }}'
20+
cancel-in-progress: true
21+
22+
defaults:
23+
run:
24+
shell: 'bash'
25+
26+
permissions:
27+
contents: 'read'
28+
id-token: 'write'
29+
issues: 'write'
30+
statuses: 'write'
631

732
jobs:
833
triage-issue:
34+
if: >
35+
github.repository == 'google-gemini/gemini-cli' &&
36+
(github.event_name == 'issues' ||
37+
github.event_name == 'workflow_dispatch' ||
38+
(github.event_name == 'issue_comment' &&
39+
contains(github.event.comment.body, '@gemini-cli /triage') &&
40+
(github.event.comment.author_association == 'OWNER' ||
41+
github.event.comment.author_association == 'MEMBER' ||
42+
github.event.comment.author_association == 'COLLABORATOR')))
943
timeout-minutes: 5
10-
if: ${{ github.repository == 'google-gemini/gemini-cli' }}
11-
permissions:
12-
issues: write
13-
contents: read
14-
id-token: write
15-
concurrency:
16-
group: ${{ github.workflow }}-${{ github.event.issue.number }}
17-
cancel-in-progress: true
18-
runs-on: ubuntu-latest
44+
runs-on: 'ubuntu-latest'
45+
1946
steps:
20-
- name: Generate GitHub App Token
21-
id: generate_token
22-
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2
47+
- name: 'Checkout repository'
48+
uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683'
49+
50+
- name: 'Generate GitHub App Token'
51+
id: 'generate_token'
52+
uses: 'actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e'
2353
with:
24-
app-id: ${{ secrets.APP_ID }}
25-
private-key: ${{ secrets.PRIVATE_KEY }}
54+
app-id: '${{ secrets.APP_ID }}'
55+
private-key: '${{ secrets.PRIVATE_KEY }}'
2656

27-
- name: Run Gemini Issue Triage
28-
uses: google-gemini/gemini-cli-action@df3f890f003d28c60a2a09d2c29e0126e4d1e2ff
57+
- name: 'Run Gemini Issue Triage'
58+
uses: 'google-github-actions/run-gemini-cli@68d5a6d2e31ff01029205c58c6bf81cb3d72910b'
59+
id: 'gemini_issue_triage'
2960
env:
30-
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
61+
GITHUB_TOKEN: '${{ steps.generate_token.outputs.token }}'
62+
ISSUE_TITLE: '${{ github.event.issue.title }}'
63+
ISSUE_BODY: '${{ github.event.issue.body }}'
64+
ISSUE_NUMBER: '${{ github.event.issue.number }}'
65+
REPOSITORY: '${{ github.repository }}'
3166
with:
32-
version: 0.1.8-rc.0
33-
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
34-
OTLP_GCP_WIF_PROVIDER: ${{ secrets.OTLP_GCP_WIF_PROVIDER }}
35-
OTLP_GOOGLE_CLOUD_PROJECT: ${{ secrets.OTLP_GOOGLE_CLOUD_PROJECT }}
36-
settings_json: |
67+
gcp_workload_identity_provider: '${{ vars.GCP_WIF_PROVIDER }}'
68+
gcp_project_id: '${{ vars.GOOGLE_CLOUD_PROJECT }}'
69+
gcp_location: '${{ vars.GOOGLE_CLOUD_LOCATION }}'
70+
gcp_service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'
71+
gemini_api_key: '${{ secrets.GEMINI_API_KEY }}'
72+
use_vertex_ai: '${{ vars.GOOGLE_GENAI_USE_VERTEXAI }}'
73+
use_gemini_code_assist: '${{ vars.GOOGLE_GENAI_USE_GCA }}'
74+
settings: |-
3775
{
76+
"maxSessionTurns": 25,
3877
"coreTools": [
3978
"run_shell_command(gh label list)",
4079
"run_shell_command(gh issue edit)",
@@ -43,12 +82,15 @@ jobs:
4382
"telemetry": {
4483
"enabled": true,
4584
"target": "gcp"
46-
},
47-
"sandbox": false
85+
}
4886
}
49-
prompt: |
87+
prompt: |-
88+
## Role
89+
5090
You are an issue triage assistant. Analyze the current GitHub issues apply the most appropriate existing labels. Do not remove labels titled help wanted or good first issue.
51-
Steps:
91+
92+
## Steps
93+
5294
1. Run: `gh label list --repo ${{ github.repository }} --limit 100` to get all available labels.
5395
2. Review the issue title, body and any comments provided in the environment variables.
5496
3. Ignore any existing priorities or tags on the issue. Just report your findings.
@@ -57,7 +99,9 @@ jobs:
5799
7. For each issue please check if CLI version is present, this is usually in the output of the /about command and will look like 0.1.5 for anything more than 6 versions older than the most recent should add the status/need-retesting label
58100
8. If you see that the issue doesn’t look like it has sufficient information recommend the status/need-information label
59101
9. Use Area definitions mentioned below to help you narrow down issues
60-
Guidelines:
102+
103+
## Guidelines
104+
61105
- Only use labels that already exist in the repository.
62106
- Do not add comments or modify the issue content.
63107
- Triage only the current issue.
@@ -141,3 +185,17 @@ jobs:
141185
- could also pertain to latency,
142186
- other general software performance like, memory usage, CPU consumption, and algorithmic efficiency.
143187
- Switching models from one to the other unexpectedly.
188+
189+
- name: 'Post Issue Triage Failure Comment'
190+
if: |-
191+
${{ failure() && steps.gemini_issue_triage.outcome == 'failure' }}
192+
uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea'
193+
with:
194+
github-token: '${{ steps.generate_token.outputs.token }}'
195+
script: |-
196+
github.rest.issues.createComment({
197+
owner: '${{ github.repository }}'.split('/')[0],
198+
repo: '${{ github.repository }}'.split('/')[1],
199+
issue_number: '${{ github.event.issue.number }}',
200+
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.'
201+
})

0 commit comments

Comments
 (0)