-
Notifications
You must be signed in to change notification settings - Fork 373
56 lines (49 loc) · 1.7 KB
/
review-app-help.yml
File metadata and controls
56 lines (49 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Show Quick Help on PR Creation
on:
pull_request:
types: [opened]
permissions:
issues: write
pull-requests: write
jobs:
debug:
uses: ./.github/workflows/debug-workflow.yml
with:
debug_enabled: false # Will still run if vars.DEBUG_WORKFLOW is true
show-quick-help:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Show Quick Reference
uses: actions/github-script@v7
with:
script: |
try {
console.log('Creating quick reference message...');
const helpMessage = [
'# 🚀 Quick Review App Commands',
'',
'Welcome! Here are the commands you can use in this PR:',
'',
'### `/deploy-review-app`',
'Deploy your PR branch for testing',
'',
'### `/delete-review-app`',
'Remove the review app when done',
'',
'### `/help`',
'Show detailed instructions, environment setup, and configuration options.',
'',
'---'
].join('\n');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: helpMessage
});
console.log('Quick reference posted successfully');
} catch (error) {
console.error('Error posting quick reference:', error);
core.setFailed(`Failed to post quick reference: ${error.message}`);
}