mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-12 12:54:07 -07:00
fix: fallback to GITHUB_TOKEN if App ID is missing
This commit is contained in:
@@ -93,6 +93,7 @@ jobs:
|
|||||||
|
|
||||||
- name: 'Generate GitHub App Token'
|
- name: 'Generate GitHub App Token'
|
||||||
id: 'generate_token'
|
id: 'generate_token'
|
||||||
|
if: ${{ secrets.APP_ID != '' }}
|
||||||
uses: 'actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b' # ratchet:actions/create-github-app-token@v2
|
uses: 'actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b' # ratchet:actions/create-github-app-token@v2
|
||||||
with:
|
with:
|
||||||
app-id: '${{ secrets.APP_ID }}'
|
app-id: '${{ secrets.APP_ID }}'
|
||||||
@@ -103,7 +104,7 @@ jobs:
|
|||||||
id: 'get_labels'
|
id: 'get_labels'
|
||||||
uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea'
|
uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea'
|
||||||
with:
|
with:
|
||||||
github-token: '${{ steps.generate_token.outputs.token }}'
|
github-token: '${{ steps.generate_token.outputs.token || secrets.GITHUB_TOKEN }}'
|
||||||
script: |-
|
script: |-
|
||||||
const { data: labels } = await github.rest.issues.listLabelsForRepo({
|
const { data: labels } = await github.rest.issues.listLabelsForRepo({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
@@ -260,7 +261,7 @@ jobs:
|
|||||||
LABELS_OUTPUT: '${{ steps.gemini_issue_analysis.outputs.summary }}'
|
LABELS_OUTPUT: '${{ steps.gemini_issue_analysis.outputs.summary }}'
|
||||||
uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea'
|
uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea'
|
||||||
with:
|
with:
|
||||||
github-token: '${{ steps.generate_token.outputs.token }}'
|
github-token: '${{ steps.generate_token.outputs.token || secrets.GITHUB_TOKEN }}'
|
||||||
script: |
|
script: |
|
||||||
const rawOutput = process.env.LABELS_OUTPUT;
|
const rawOutput = process.env.LABELS_OUTPUT;
|
||||||
core.info(`Raw output from model: ${rawOutput}`);
|
core.info(`Raw output from model: ${rawOutput}`);
|
||||||
@@ -326,7 +327,7 @@ jobs:
|
|||||||
RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
|
RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
|
||||||
uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea'
|
uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea'
|
||||||
with:
|
with:
|
||||||
github-token: '${{ steps.generate_token.outputs.token }}'
|
github-token: '${{ steps.generate_token.outputs.token || secrets.GITHUB_TOKEN }}'
|
||||||
script: |-
|
script: |-
|
||||||
github.rest.issues.createComment({
|
github.rest.issues.createComment({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
|
|||||||
Reference in New Issue
Block a user