|
27 | 27 | PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number }}
|
28 | 28 |
|
29 | 29 | jobs:
|
30 |
| - debug: |
31 |
| - uses: ./.github/workflows/debug-workflow.yml |
32 |
| - with: |
33 |
| - debug_enabled: false |
34 |
| - |
35 | 30 | deploy:
|
36 | 31 | if: |
|
37 | 32 | (github.event_name == 'pull_request') ||
|
@@ -371,3 +366,40 @@ jobs:
|
371 | 366 | comment_id: ${{ steps.create-comment.outputs.comment-id }},
|
372 | 367 | body: isSuccess ? successMessage : failureMessage
|
373 | 368 | });
|
| 369 | + |
| 370 | + - name: Show Quick Reference |
| 371 | + if: github.event_name == 'pull_request' && github.event.action == 'opened' |
| 372 | + uses: actions/github-script@v7 |
| 373 | + with: |
| 374 | + script: | |
| 375 | + try { |
| 376 | + console.log('Creating quick reference message...'); |
| 377 | + const helpMessage = [ |
| 378 | + '# 🚀 Quick Review App Commands', |
| 379 | + '', |
| 380 | + 'Welcome! Here are the commands you can use in this PR:', |
| 381 | + '', |
| 382 | + '### `/deploy-review-app`', |
| 383 | + 'Deploy your PR branch for testing', |
| 384 | + '', |
| 385 | + '### `/delete-review-app`', |
| 386 | + 'Remove the review app when done', |
| 387 | + '', |
| 388 | + '### `/help`', |
| 389 | + 'Show detailed instructions, environment setup, and configuration options.', |
| 390 | + '', |
| 391 | + '---' |
| 392 | + ].join('\n'); |
| 393 | + |
| 394 | + await github.rest.issues.createComment({ |
| 395 | + owner: context.repo.owner, |
| 396 | + repo: context.repo.repo, |
| 397 | + issue_number: context.issue.number, |
| 398 | + body: helpMessage |
| 399 | + }); |
| 400 | + |
| 401 | + console.log('Quick reference posted successfully'); |
| 402 | + } catch (error) { |
| 403 | + console.error('Error posting quick reference:', error); |
| 404 | + core.setFailed(`Failed to post quick reference: ${error.message}`); |
| 405 | + } |
0 commit comments