You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/help-command.yml
+10-90Lines changed: 10 additions & 90 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,9 @@
1
1
name: Show Help for Commands
2
2
3
3
on:
4
+
push:
5
+
branches:
6
+
- "**"# Trigger on all branches, including feature branches
4
7
issue_comment:
5
8
types: [created]
6
9
workflow_dispatch:
@@ -10,6 +13,13 @@ permissions:
10
13
pull-requests: write
11
14
12
15
jobs:
16
+
log-workflow-branch:
17
+
runs-on: ubuntu-latest
18
+
steps:
19
+
- name: Identify Workflow Branch
20
+
run:
21
+
echo "Workflow branch ref: ${{ github.ref }}"
22
+
13
23
show-help:
14
24
if: |
15
25
github.event_name == 'workflow_dispatch' ||
@@ -95,96 +105,6 @@ jobs:
95
105
'For more information, see the [React on Rails Tutorial documentation](https://github.com/shakacode/react-on-rails/tree/master/react-webpack-rails-tutorial)'
96
106
].join('\n');
97
107
98
-
await github.rest.issues.createComment({
99
-
owner: context.repo.owner,
100
-
repo: context.repo.repo,
101
-
issue_number: context.issue.number,
102
-
name: Show Help for Commands
103
-
104
-
on:
105
-
issue_comment:
106
-
types: [created]
107
-
108
-
permissions:
109
-
issues: write
110
-
pull-requests: write
111
-
112
-
jobs:
113
-
show-help:
114
-
if: |
115
-
github.event_name == 'issue_comment' &&
116
-
github.event.issue.pull_request &&
117
-
github.event.comment.body == '/help'
118
-
runs-on: ubuntu-latest
119
-
120
-
steps:
121
-
- name: Show Available Commands
122
-
uses: actions/github-script@v7
123
-
with:
124
-
script: |
125
-
try {
126
-
console.log('Creating detailed help message...');
127
-
const helpMessage = [
128
-
'# 📚 Detailed Review App Commands Guide',
129
-
'',
130
-
'This is a detailed guide to using review app commands. For a quick reference, see the message posted when your PR was created.',
131
-
'',
132
-
'## Available Commands',
133
-
'',
134
-
'### `/deploy-review-app`',
135
-
'Deploys your PR branch to a review environment on Control Plane.',
136
-
'- Creates a new review app if one doesn\'t exist',
137
-
'- Updates the existing review app if it already exists',
138
-
'- Provides a unique URL to preview your changes',
139
-
'- Shows build and deployment progress in real-time',
140
-
'',
141
-
'**Required Environment Variables:**',
142
-
'- `CPLN_TOKEN`: Control Plane authentication token',
143
-
'- `CPLN_ORG`: Control Plane organization name',
144
-
'',
145
-
'**Optional Configuration:**',
146
-
'- `WAIT_TIMEOUT`: Deployment timeout in seconds (default: 900)',
147
-
' - Must be a positive integer',
148
-
' - Can be set in GitHub Actions variables',
149
-
' - Applies to both deployment and workload readiness checks',
150
-
'',
151
-
'### `/delete-review-app`',
152
-
'Deletes the review app associated with this PR.',
153
-
'- Removes all resources from Control Plane',
154
-
'- Helpful for cleaning up when you\'re done testing',
155
-
'- Can be re-deployed later using `/deploy-review-app`',
156
-
'',
157
-
'**Required Environment Variables:**',
158
-
'- `CPLN_TOKEN`: Control Plane authentication token',
159
-
'- `CPLN_ORG`: Control Plane organization name',
160
-
'',
161
-
'### `/help`',
162
-
'Shows this detailed help message.',
163
-
'',
164
-
'---',
165
-
'## Environment Setup',
166
-
'',
167
-
'1. Set required secrets in your repository settings:',
168
-
' - `CPLN_TOKEN`',
169
-
' - `CPLN_ORG`',
170
-
'',
171
-
'2. Optional: Configure `WAIT_TIMEOUT` in GitHub Actions variables to customize deployment timeout',
172
-
'',
173
-
'## Control Plane Integration',
174
-
'',
175
-
'Review apps are deployed to Control Plane with the following configuration:',
176
-
'- App Name Format: `qa-react-webpack-rails-tutorial-pr-{PR_NUMBER}`',
'For more information, see the [React on Rails Tutorial documentation](https://github.com/shakacode/react-on-rails/tree/master/react-webpack-rails-tutorial)'
0 commit comments