@@ -83,18 +83,24 @@ jobs:
8383 env :
8484 EVENT_TYPE : ' ${{ github.event_name }}.${{ github.event.action }}'
8585 REQUEST : ' ${{ github.event.comment.body || github.event.review.body || github.event.issue.body }}'
86+ IS_PR : ' ${{ !!(github.event.pull_request || github.event.issue.pull_request) }}'
8687 with :
8788 script : |
8889 const eventType = process.env.EVENT_TYPE;
8990 const request = process.env.REQUEST;
91+ const isPr = process.env.IS_PR === 'true';
9092 core.setOutput('request', request);
9193
9294 if (eventType === 'pull_request.opened') {
9395 core.setOutput('command', 'review');
9496 } else if (request.startsWith("@gemini-cli /review")) {
95- core.setOutput('command', 'review');
96- const additionalContext = request.replace(/^@gemini-cli \/review/, '').trim();
97- core.setOutput('additional_context', additionalContext);
97+ if (isPr) {
98+ core.setOutput('command', 'review');
99+ const additionalContext = request.replace(/^@gemini-cli \/review/, '').trim();
100+ core.setOutput('additional_context', additionalContext);
101+ } else {
102+ core.setOutput('command', 'fallthrough');
103+ }
98104 } else if (request.startsWith("@gemini-cli")) {
99105 const additionalContext = request.replace(/^@gemini-cli/, '').trim();
100106 core.setOutput('command', 'invoke');
0 commit comments