Skip to content

Commit 8261ebd

Browse files
adelva1984Databean
authored andcommitted
Remove issue related functions
We have issues disabled
1 parent dd0ccdd commit 8261ebd

8 files changed

Lines changed: 16 additions & 620 deletions

.github/commands/gemini-scheduled-triage.toml

Lines changed: 0 additions & 116 deletions
This file was deleted.

.github/commands/gemini-triage.toml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/gemini-dispatch.yml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ on:
1010
pull_request:
1111
types:
1212
- 'opened'
13-
issues:
14-
types:
15-
- 'opened'
16-
- 'reopened'
17-
issue_comment:
18-
types:
19-
- 'created'
2013

2114
defaults:
2215
run:
@@ -44,15 +37,11 @@ jobs:
4437
4538
dispatch:
4639
# For PRs: only if not from a fork
47-
# For issues: only on open/reopen
4840
# For comments: only if user types @gemini-cli and is OWNER/MEMBER/COLLABORATOR
4941
if: |-
5042
(
5143
github.event_name == 'pull_request' &&
5244
github.event.pull_request.head.repo.fork == false
53-
) || (
54-
github.event_name == 'issues' &&
55-
contains(fromJSON('["opened", "reopened"]'), github.event.action)
5645
) || (
5746
github.event.sender.type == 'User' &&
5847
startsWith(github.event.comment.body || github.event.review.body || github.event.issue.body, '@gemini-cli') &&
@@ -61,13 +50,11 @@ jobs:
6150
runs-on: 'ubuntu-latest'
6251
permissions:
6352
contents: 'read'
64-
issues: 'write'
6553
pull-requests: 'write'
6654
outputs:
6755
command: '${{ steps.extract_command.outputs.command }}'
6856
request: '${{ steps.extract_command.outputs.request }}'
6957
additional_context: '${{ steps.extract_command.outputs.additional_context }}'
70-
issue_number: '${{ github.event.pull_request.number || github.event.issue.number }}'
7158
steps:
7259
- name: 'Mint identity token'
7360
id: 'mint_identity_token'
@@ -78,7 +65,6 @@ jobs:
7865
app-id: '${{ vars.APP_ID }}'
7966
private-key: '${{ secrets.APP_PRIVATE_KEY }}'
8067
permission-contents: 'read'
81-
permission-issues: 'write'
8268
permission-pull-requests: 'write'
8369

8470
- name: 'Extract command'
@@ -95,14 +81,10 @@ jobs:
9581
9682
if (eventType === 'pull_request.opened') {
9783
core.setOutput('command', 'review');
98-
} else if (['issues.opened', 'issues.reopened'].includes(eventType)) {
99-
core.setOutput('command', 'triage');
10084
} else if (request.startsWith("@gemini-cli /review")) {
10185
core.setOutput('command', 'review');
10286
const additionalContext = request.replace(/^@gemini-cli \/review/, '').trim();
10387
core.setOutput('additional_context', additionalContext);
104-
} else if (request.startsWith("@gemini-cli /triage")) {
105-
core.setOutput('command', 'triage');
10688
} else if (request.startsWith("@gemini-cli /approve")) {
10789
core.setOutput('command', 'approve');
10890
} else if (request.startsWith("@gemini-cli")) {
@@ -133,21 +115,6 @@ jobs:
133115
permissions:
134116
contents: 'read'
135117
id-token: 'write'
136-
issues: 'write'
137-
pull-requests: 'write'
138-
with:
139-
additional_context: '${{ needs.dispatch.outputs.additional_context }}'
140-
secrets: 'inherit'
141-
142-
triage:
143-
needs: 'dispatch'
144-
if: |-
145-
${{ needs.dispatch.outputs.command == 'triage' }}
146-
uses: './.github/workflows/gemini-triage.yml'
147-
permissions:
148-
contents: 'read'
149-
id-token: 'write'
150-
issues: 'write'
151118
pull-requests: 'write'
152119
with:
153120
additional_context: '${{ needs.dispatch.outputs.additional_context }}'
@@ -161,7 +128,6 @@ jobs:
161128
permissions:
162129
contents: 'read'
163130
id-token: 'write'
164-
issues: 'write'
165131
pull-requests: 'write'
166132
with:
167133
additional_context: '${{ needs.dispatch.outputs.additional_context }}'
@@ -175,7 +141,6 @@ jobs:
175141
permissions:
176142
contents: 'write'
177143
id-token: 'write'
178-
issues: 'write'
179144
pull-requests: 'write'
180145
with:
181146
additional_context: '${{ needs.dispatch.outputs.additional_context }}'
@@ -185,15 +150,13 @@ jobs:
185150
needs:
186151
- 'dispatch'
187152
- 'review'
188-
- 'triage'
189153
- 'invoke'
190154
- 'plan-execute'
191155
if: |-
192156
${{ always() && !cancelled() && (failure() || needs.dispatch.outputs.command == 'fallthrough') }}
193157
runs-on: 'ubuntu-latest'
194158
permissions:
195159
contents: 'read'
196-
issues: 'write'
197160
pull-requests: 'write'
198161
steps:
199162
- name: 'Mint identity token'
@@ -205,7 +168,6 @@ jobs:
205168
app-id: '${{ vars.APP_ID }}'
206169
private-key: '${{ secrets.APP_PRIVATE_KEY }}'
207170
permission-contents: 'read'
208-
permission-issues: 'write'
209171
permission-pull-requests: 'write'
210172

211173
- name: 'Send failure comment'

.github/workflows/gemini-invoke.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
required: false
1010

1111
concurrency:
12-
group: '${{ github.workflow }}-invoke-${{ github.event_name }}-${{ github.event.pull_request.number || github.event.issue.number }}'
12+
group: '${{ github.workflow }}-invoke-${{ github.event_name }}-${{ github.event.pull_request.number }}'
1313
cancel-in-progress: false
1414

1515
defaults:
@@ -22,7 +22,6 @@ jobs:
2222
permissions:
2323
contents: 'read'
2424
id-token: 'write'
25-
issues: 'write'
2625
pull-requests: 'write'
2726
steps:
2827
- name: 'Mint identity token'
@@ -34,7 +33,6 @@ jobs:
3433
app-id: '${{ vars.APP_ID }}'
3534
private-key: '${{ secrets.APP_PRIVATE_KEY }}'
3635
permission-contents: 'read'
37-
permission-issues: 'write'
3836
permission-pull-requests: 'write'
3937

4038
- name: 'Checkout Code'
@@ -44,12 +42,12 @@ jobs:
4442
id: 'run_gemini'
4543
uses: 'google-github-actions/run-gemini-cli@v0' # ratchet:exclude
4644
env:
47-
TITLE: '${{ github.event.pull_request.title || github.event.issue.title }}'
48-
DESCRIPTION: '${{ github.event.pull_request.body || github.event.issue.body }}'
45+
TITLE: '${{ github.event.pull_request.title }}'
46+
DESCRIPTION: '${{ github.event.pull_request.body }}'
4947
EVENT_NAME: '${{ github.event_name }}'
5048
GITHUB_TOKEN: '${{ steps.mint_identity_token.outputs.token || secrets.GITHUB_TOKEN || github.token }}'
5149
IS_PULL_REQUEST: '${{ !!github.event.pull_request }}'
52-
ISSUE_NUMBER: '${{ github.event.pull_request.number || github.event.issue.number }}'
50+
ISSUE_NUMBER: '${{ github.event.pull_request.number }}'
5351
REPOSITORY: '${{ github.repository }}'
5452
ADDITIONAL_CONTEXT: '${{ inputs.additional_context }}'
5553
with:
@@ -69,7 +67,6 @@ jobs:
6967
# Assistant workflows can be triggered by comments on either Issues or PRs.
7068
# We explicitly map both fields so the CLI can correctly categorize the interaction.
7169
github_pr_number: '${{ github.event.pull_request.number }}'
72-
github_issue_number: '${{ github.event.issue.number }}'
7370
settings: |-
7471
{
7572
"model": {
@@ -92,10 +89,6 @@ jobs:
9289
"ghcr.io/github/github-mcp-server:v0.27.0"
9390
],
9491
"includeTools": [
95-
"add_issue_comment",
96-
"issue_read",
97-
"list_issues",
98-
"search_issues",
9992
"pull_request_read",
10093
"list_pull_requests",
10194
"search_pull_requests",

0 commit comments

Comments
 (0)