Skip to content
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
56 changes: 12 additions & 44 deletions .github/workflows/gemini-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ on:
types:
- 'opened'
- 'ready_for_review'
issues:
types:
- 'opened'
- 'reopened'

issue_comment:
types:
- 'created'
Expand Down Expand Up @@ -52,9 +49,6 @@ jobs:
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.fork == false &&
github.event.pull_request.draft == false
) || (
github.event_name == 'issues' &&
contains(fromJSON('["opened", "reopened"]'), github.event.action)
) || (
github.event.sender.type == 'User' &&
startsWith(github.event.comment.body || github.event.review.body || github.event.issue.body, '@gemini-cli') &&
Expand Down Expand Up @@ -89,24 +83,24 @@ jobs:
env:
EVENT_TYPE: '${{ github.event_name }}.${{ github.event.action }}'
REQUEST: '${{ github.event.comment.body || github.event.review.body || github.event.issue.body }}'
IS_PR: '${{ !!(github.event.pull_request || github.event.issue.pull_request) }}'
with:
script: |
const eventType = process.env.EVENT_TYPE;
const request = process.env.REQUEST;
const isPr = process.env.IS_PR === 'true';
core.setOutput('request', request);

if (eventType === 'pull_request.opened') {
core.setOutput('command', 'review');
} else if (['issues.opened', 'issues.reopened'].includes(eventType)) {
core.setOutput('command', 'triage');
} else if (request.startsWith("@gemini-cli /review")) {
core.setOutput('command', 'review');
const additionalContext = request.replace(/^@gemini-cli \/review/, '').trim();
core.setOutput('additional_context', additionalContext);
} else if (request.startsWith("@gemini-cli /triage")) {
core.setOutput('command', 'triage');
} else if (request.startsWith("@gemini-cli /approve")) {
core.setOutput('command', 'approve');
if (isPr) {
core.setOutput('command', 'review');
const additionalContext = request.replace(/^@gemini-cli \/review/, '').trim();
core.setOutput('additional_context', additionalContext);
} else {
core.setOutput('command', 'fallthrough');
}
} else if (request.startsWith("@gemini-cli")) {
const additionalContext = request.replace(/^@gemini-cli/, '').trim();
core.setOutput('command', 'invoke');
Expand Down Expand Up @@ -141,19 +135,7 @@ jobs:
additional_context: '${{ needs.dispatch.outputs.additional_context }}'
secrets: 'inherit'

triage:
needs: 'dispatch'
if: |-
${{ needs.dispatch.outputs.command == 'triage' }}
uses: './.github/workflows/gemini-triage.yml'
permissions:
contents: 'read'
id-token: 'write'
issues: 'write'
pull-requests: 'write'
with:
additional_context: '${{ needs.dispatch.outputs.additional_context }}'
secrets: 'inherit'


invoke:
needs: 'dispatch'
Expand All @@ -169,27 +151,13 @@ jobs:
additional_context: '${{ needs.dispatch.outputs.additional_context }}'
secrets: 'inherit'

plan-execute:
needs: 'dispatch'
if: |-
${{ needs.dispatch.outputs.command == 'approve' }}
uses: './.github/workflows/gemini-plan-execute.yml'
permissions:
contents: 'write'
id-token: 'write'
issues: 'write'
pull-requests: 'write'
with:
additional_context: '${{ needs.dispatch.outputs.additional_context }}'
secrets: 'inherit'


fallthrough:
needs:
- 'dispatch'
- 'review'
- 'triage'
- 'invoke'
- 'plan-execute'
if: |-
${{ always() && !cancelled() && (failure() || needs.dispatch.outputs.command == 'fallthrough') }}
runs-on: 'ubuntu-latest'
Expand Down
130 changes: 0 additions & 130 deletions .github/workflows/gemini-plan-execute.yml

This file was deleted.

Loading
Loading