Skip to content

Commit c90b70b

Browse files
committed
wip
1 parent 8aca18e commit c90b70b

File tree

2 files changed

+24
-27
lines changed

2 files changed

+24
-27
lines changed

.github/workflows/add-comment-on-pr-creation.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ jobs:
1010
permissions:
1111
pull-requests: write
1212
steps:
13-
name: Add GitHub Comment for review app instructions
14-
uses: actions/github-script@v7
15-
with:
16-
script: |
17-
await github.rest.issues.createComment({
18-
owner: context.repo.owner,
19-
repo: context.repo.repo,
20-
issue_number: context.payload.pull_request.number,
21-
body: [
22-
"Hi 👋 Here are the commands available for this PR:",
23-
"",
24-
"- `/deploy-review-app`: Deploy your changes to a review environment",
25-
"- `/delete-review-app`: Clean up the review environment when you're done",
26-
"- `/help`: Show detailed information about all commands",
27-
"",
28-
"Use `/help` to see full documentation, including configuration options."
29-
].join("\n")
30-
});
13+
- uses: actions/github-script@v7
14+
name: Add GitHub Comment for review app instructions
15+
with:
16+
script: |
17+
await github.rest.issues.createComment({
18+
owner: context.repo.owner,
19+
repo: context.repo.repo,
20+
issue_number: context.payload.pull_request.number,
21+
body: [
22+
"Hi 👋 Here are the commands available for this PR:",
23+
"",
24+
"- `/deploy-review-app`: Deploy your changes to a review environment",
25+
"- `/delete-review-app`: Clean up the review environment when you're done",
26+
"- `/help`: Show detailed information about all commands",
27+
"",
28+
"Use `/help` to see full documentation, including configuration options."
29+
].join("\n")
30+
});

.github/workflows/deploy-to-control-plane.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,26 @@ name: Deploy Review App to Control Plane
33
run-name: ${{ (github.event_name == 'pull_request' || (github.event_name == 'issue_comment' && github.event.issue.pull_request)) && 'Deploying Review App' || format('Deploying {0} to Staging App', github.ref_name) }}
44

55
on:
6-
pull_request:
7-
types: [opened, synchronize, reopened]
86
issue_comment:
97
types: [created]
108

119
# Use concurrency to cancel in-progress runs
1210
concurrency:
13-
group: deploy-${{ github.event.pull_request.number || github.event.issue.number }}
11+
group: deploy-${{ github.event.issue.number }}
1412
cancel-in-progress: true
1513

1614
env:
17-
APP_NAME: qa-react-webpack-rails-tutorial-pr-${{ github.event.pull_request.number || github.event.issue.number }}
15+
APP_NAME: qa-react-webpack-rails-tutorial-pr-${{ github.event.issue.number }}
1816
CPLN_ORG: ${{ secrets.CPLN_ORG }}
1917
CPLN_TOKEN: ${{ secrets.CPLN_TOKEN }}
20-
PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
18+
PR_NUMBER: ${{ github.event.issue.number }}
2119

2220
jobs:
2321
Process-Deployment-Command:
2422
if: |
25-
(github.event_name == 'pull_request') ||
26-
(github.event_name == 'issue_comment' &&
27-
github.event.issue.pull_request &&
28-
github.event.comment.body == '/deploy-review-app')
23+
github.event_name == 'issue_comment' &&
24+
github.event.issue.pull_request &&
25+
github.event.comment.body == '/deploy-review-app'
2926
runs-on: ubuntu-latest
3027
permissions:
3128
contents: read

0 commit comments

Comments
 (0)