Skip to content

Commit bfe1348

Browse files
ci(medium): Reduce manual trigger guide redundancy in workflow comments (#9540)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: arii <342438+arii@users.noreply.github.com>
1 parent ce3fec4 commit bfe1348

9 files changed

Lines changed: 18 additions & 87 deletions

.github/workflows/conflict-resolver.yml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,7 @@ jobs:
117117
✅ Successfully resolved all conflicts by merging the latest changes from `${{ inputs.target_branch }}`. The pull request has been updated.
118118
119119
---
120-
#### 🤖 Gemini Manual Trigger Quick Reference
121-
| Command | Action |
122-
| :--- | :--- |
123-
| \`@gemini-bot\` | Run AI Code Review |
124-
| \`@gemini-triage\` | Run Issue Triage |
125-
| \`@gemini-coder <task>\` | Generate Code |
126-
| \`@create-review-issues\` | Create issues from review |
127-
128-
[Manual Trigger Guide](${{ github.server_url }}/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)
120+
#### 🤖 [Gemini Manual Trigger Guide](${{ github.server_url }}/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)
129121
<!-- id: conflict-resolver-bot -->
130122
token: ${{ secrets.GITHUB_TOKEN }}
131123

@@ -145,15 +137,7 @@ jobs:
145137
Please resolve these conflicts manually.
146138
147139
---
148-
#### 🤖 Gemini Manual Trigger Quick Reference
149-
| Command | Action |
150-
| :--- | :--- |
151-
| \`@gemini-bot\` | Run AI Code Review |
152-
| \`@gemini-triage\` | Run Issue Triage |
153-
| \`@gemini-coder <task>\` | Generate Code |
154-
| \`@create-review-issues\` | Create issues from review |
155-
156-
[Manual Trigger Guide](${{ github.server_url }}/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)
140+
#### 🤖 [Gemini Manual Trigger Guide](${{ github.server_url }}/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)
157141
<!-- id: conflict-resolver-bot -->
158142
token: ${{ secrets.GITHUB_TOKEN }}
159143

.github/workflows/gemini-coder.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -660,16 +660,7 @@ jobs:
660660
${{ env.FILES }}
661661
662662
---
663-
#### 🤖 Gemini Manual Trigger Quick Reference
664-
| Command | Action |
665-
| :--- | :--- |
666-
| \`@gemini-bot\` | Run AI Code Review (PR only) |
667-
| \`@gemini-triage\` | Run Issue Triage |
668-
| \`@gemini-coder <task>\` | Generate Code |
669-
| \`@create-review-issues\` | Create issues from review (PR only) |
670-
| \`@gemini-help\` | Show this help message |
671-
672-
[Manual Trigger Guide](${{ github.server_url }}/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)
663+
#### 🤖 [Gemini Manual Trigger Guide](${{ github.server_url }}/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)
673664
branch: ${{ env.BRANCH }}
674665
base: leader
675666
delete-branch: true
@@ -694,15 +685,7 @@ jobs:
694685
'2. Click "Run workflow"\n' +
695686
'3. Enter task description and other details.\n\n' +
696687
'**Via GitHub CLI:**\n```bash\ngh workflow run gemini-coder.yml -f task_description="..."\n```\n\n' +
697-
'#### 🤖 Manual Trigger Quick Reference\n' +
698-
'| Command | Action |\n' +
699-
'| :--- | :--- |\n' +
700-
'| `@gemini-bot` | Run AI Code Review (PR only) |\n' +
701-
'| `@gemini-triage` | Run Issue Triage |\n' +
702-
'| `@gemini-coder <task>` | Generate Code |\n' +
703-
'| `@create-review-issues` | Create issues from review (PR only) |\n' +
704-
'| `@gemini-help` | Show this help message |\n\n' +
705-
'Full reference: [Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)\n\n' +
688+
'#### 🤖 [Gemini Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)\n\n' +
706689
'**To re-enable:** Set repository variable `GEMINI_ENABLE_CODER=true`';
707690
708691
github.rest.issues.createComment({

.github/workflows/gemini-triage.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ jobs:
135135
const path = require('path');
136136
const issue_number = parseInt(process.env.ISSUE_NUMBER);
137137
138-
const footer = '\n\n---\n#### 🤖 Gemini Manual Trigger Quick Reference\n' +
138+
const fullFooter = '\n\n---\n#### 🤖 Gemini Manual Trigger Quick Reference\n' +
139139
'| Command | Action |\n' +
140140
'| :--- | :--- |\n' +
141141
'| `@gemini-bot` | Run AI Code Review (PR only) |\n' +
@@ -145,6 +145,10 @@ jobs:
145145
'| `@gemini-help` | Show this help message |\n\n' +
146146
'[Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)';
147147
148+
const shortFooter = '\n\n---\n#### 🤖 [Gemini Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)';
149+
150+
const footer = (context.eventName === 'issues' && (context.payload.action === 'opened' || context.payload.action === 'reopened')) ? fullFooter : shortFooter;
151+
148152
try {
149153
const filePath = path.resolve(process.cwd(), 'triage_result.json');
150154
if (!fs.existsSync(filePath)) {

.github/workflows/pr-quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ jobs:
11181118
fi
11191119
11201120
# Create manual trigger footer
1121-
FOOTER="\n\n---\n#### 🤖 Gemini Manual Trigger Quick Reference\n| Command | Action |\n| :--- | :--- |\n| \`@gemini-bot\` | Run AI Code Review (PR only) |\n| \`@gemini-triage\` | Run Issue Triage |\n| \`@gemini-coder <task>\` | Generate Code |\n| \`@create-review-issues\` | Create issues from review (PR only) |\n| \`@gemini-help\` | Show this help message |\n\n[Manual Trigger Guide](https://github.com/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)"
1121+
FOOTER="\n\n---\n#### 🤖 [Gemini Manual Trigger Guide](https://github.com/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)"
11221122
11231123
COMMENT_BODY+="\n${SUMMARY_MSG}${FOOTER}\n\n---\n> Report generated for commit: \`${SHA}\`"
11241124

.github/workflows/pr-squash.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ jobs:
159159
content: 'confused'
160160
});
161161
162-
const footer = '\n---\n#### 🤖 Gemini Manual Trigger Quick Reference\n| Command | Action |\n| :--- | :--- |\n| `@gemini-bot` | Run AI Code Review (PR only) |\n| `@gemini-triage` | Run Issue Triage |\n| `@gemini-coder <task>` | Generate Code |\n| `@create-review-issues` | Create issues from review (PR only) |\n| `@gemini-help` | Show this help message |\n| `@pr-squash` | Squash PR commits (PR only) |\n| `@conflict-resolve` | Resolve merge conflicts (PR only) |\n\n[Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)';
162+
const footer = '\n---\n#### 🤖 [Gemini Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)';
163163
164164
await github.rest.issues.createComment({
165165
owner: context.repo.owner,
@@ -182,7 +182,7 @@ jobs:
182182
messageBody = '✅ Commits squashed successfully!';
183183
}
184184
185-
const footer = '\n---\n#### 🤖 Gemini Manual Trigger Quick Reference\n| Command | Action |\n| :--- | :--- |\n| `@gemini-bot` | Run AI Code Review (PR only) |\n| `@gemini-triage` | Run Issue Triage |\n| `@gemini-coder <task>` | Generate Code |\n| `@create-review-issues` | Create issues from review (PR only) |\n| `@gemini-help` | Show this help message |\n| `@pr-squash` | Squash PR commits (PR only) |\n| `@conflict-resolve` | Resolve merge conflicts (PR only) |\n\n[Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)';
185+
const footer = '\n---\n#### 🤖 [Gemini Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)';
186186
187187
await github.rest.reactions.createForIssueComment({
188188
owner: context.repo.owner,

.github/workflows/reusable-create-review-issues.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,7 @@ jobs:
6565
'3. Enter PR number: `' + context.payload.pull_request.number + '`\n' +
6666
'4. Enter Run ID from a successful review workflow.\n\n' +
6767
'**Via GitHub CLI:**\n```bash\ngh workflow run reusable-create-review-issues.yml -f pr_number=' + context.payload.pull_request.number + ' -f run_id=...\n```\n\n' +
68-
'#### 🤖 Manual Trigger Quick Reference\n' +
69-
'| Command | Action |\n' +
70-
'| :--- | :--- |\n' +
71-
'| `@gemini-bot` | Run AI Code Review (PR only) |\n' +
72-
'| `@gemini-triage` | Run Issue Triage |\n' +
73-
'| `@gemini-coder <task>` | Generate Code |\n' +
74-
'| `@create-review-issues` | Create issues from review (PR only) |\n' +
75-
'| `@gemini-help` | Show this help message |\n\n' +
76-
'Full reference: [Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)\n\n' +
68+
'#### 🤖 [Gemini Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)\n\n' +
7769
'**To re-enable:** Set repository variable `GEMINI_ENABLE_REVIEW_ISSUES=true`';
7870
7971
github.rest.issues.createComment({

.github/workflows/reusable-gemini-review.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ jobs:
427427
COMMIT_HASH_MSG="> Reviewed commit: \`${HEAD_SHA}\`"
428428
429429
# Create manual trigger footer
430-
FOOTER="\n\n---\n#### 🤖 Gemini Manual Trigger Quick Reference\n| Command | Action |\n| :--- | :--- |\n| \`@gemini-bot\` | Run AI Code Review (PR only) |\n| \`@gemini-triage\` | Run Issue Triage |\n| \`@gemini-coder <task>\` | Generate Code |\n| \`@create-review-issues\` | Create issues from review (PR only) |\n| \`@gemini-help\` | Show this help message |\n\n[Manual Trigger Guide](${{ github.server_url }}/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)"
430+
FOOTER="\n\n---\n#### 🤖 [Gemini Manual Trigger Guide](${{ github.server_url }}/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)"
431431
432432
# Combine the header and the original comment
433433
FINAL_COMMENT="${COMMIT_HASH_MSG}\n\n${REVIEW_COMMENT}${FOOTER}"
@@ -499,15 +499,7 @@ jobs:
499499
'2. Click "Run workflow"\n' +
500500
'3. Enter PR number: `' + context.payload.pull_request.number + '`\n\n' +
501501
'**Via GitHub CLI:**\n```bash\ngh workflow run reusable-gemini-review.yml -f pr_number=' + context.payload.pull_request.number + '\n```\n\n' +
502-
'#### 🤖 Manual Trigger Quick Reference\n' +
503-
'| Command | Action |\n' +
504-
'| :--- | :--- |\n' +
505-
'| `@gemini-bot` | Run AI Code Review (PR only) |\n' +
506-
'| `@gemini-triage` | Run Issue Triage |\n' +
507-
'| `@gemini-coder <task>` | Generate Code |\n' +
508-
'| `@create-review-issues` | Create issues from review (PR only) |\n' +
509-
'| `@gemini-help` | Show this help message |\n\n' +
510-
'Full reference: [Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)\n\n' +
502+
'#### 🤖 [Gemini Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)\n\n' +
511503
'**To re-enable:** Set repository variable `GEMINI_ENABLE_PR_REVIEW=true`';
512504
513505
github.rest.issues.createComment({
@@ -558,15 +550,7 @@ jobs:
558550
559551
if (triggerEvent === 'comment' || !shouldIgnore) {
560552
const body = '### 🤖 Gemini Review Skipped\n\nReview was skipped for the following reason: `' + skipReason + '`' +
561-
'\n\n#### 🤖 Manual Trigger Quick Reference\n' +
562-
'| Command | Action |\n' +
563-
'| :--- | :--- |\n' +
564-
'| `@gemini-bot` | Run AI Code Review (PR only) |\n' +
565-
'| `@gemini-triage` | Run Issue Triage |\n' +
566-
'| `@gemini-coder <task>` | Generate Code |\n' +
567-
'| `@create-review-issues` | Create issues from review (PR only) |\n' +
568-
'| `@gemini-help` | Show this help message |\n\n' +
569-
'[Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)';
553+
'\n\n#### 🤖 [Gemini Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)';
570554
571555
github.rest.issues.createComment({
572556
owner: context.repo.owner,

scripts/ci-check-slop.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,7 @@ if [ "${GEMINI_ENABLE_SLOP_CHECK:-true}" == "false" ]; then
6363
echo "gh workflow run pr-quality.yml"
6464
echo "\`\`\`"
6565
echo ""
66-
echo "#### 🤖 Manual Trigger Quick Reference"
67-
echo "| Command | Action |"
68-
echo "| :--- | :--- |"
69-
echo "| \`@gemini-bot\` | Run AI Code Review (PR only) |"
70-
echo "| \`@gemini-triage\` | Run Issue Triage |"
71-
echo "| \`@gemini-coder <task>\` | Generate Code |"
72-
echo "| \`@create-review-issues\` | Create issues from review (PR only) |"
73-
echo "| \`@gemini-help\` | Show this help message |"
74-
echo ""
75-
echo "Full reference: [Manual Trigger Guide](${GITHUB_SERVER_URL:-"https://github.com"}/${GITHUB_REPOSITORY}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)"
66+
echo "#### 🤖 [Gemini Manual Trigger Guide](${GITHUB_SERVER_URL:-"https://github.com"}/${GITHUB_REPOSITORY}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)"
7667
} > "$GEMINI_SLOP_LOG"
7768
else
7869
echo "Requesting Gemini feedback..."

scripts/create-review-issues.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,7 @@ export class GitHubClient implements IGitHubClient {
227227
- **Branch:** ${branchInfo}
228228
- **Commit:** ${commitLink}
229229
230-
#### 🤖 Gemini Manual Trigger Quick Reference
231-
| Command | Action |
232-
| :--- | :--- |
233-
| \`@gemini-bot\` | Run AI Code Review (PR only) |
234-
| \`@gemini-triage\` | Run Issue Triage |
235-
| \`@gemini-coder <task>\` | Generate Code |
236-
| \`@create-review-issues\` | Create issues from review (PR only) |
237-
| \`@gemini-help\` | Show this help message |`
230+
#### 🤖 [Gemini Manual Trigger Guide](https://github.com/${context.repo}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)`
238231

239232
const fingerprintMarker = issue.fingerprint
240233
? `\n<!-- fingerprint: ${issue.fingerprint} -->`

0 commit comments

Comments
 (0)