Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 75e06ab

Browse files
Demo of Github Action Workflow Changes (#644)
* stop triggering review app deployment on opening of pr * remove push event references since redundant with PR synchronization * remove twitter reference * don't deploy on pull request trigger * update help * make sure to checkout right ref before setup
1 parent b025670 commit 75e06ab

File tree

3 files changed

+25
-35
lines changed

3 files changed

+25
-35
lines changed

‎.github/workflows/deploy-to-control-plane-review-app.yml

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ run-name: Deploy PR Review App - PR #${{ github.event.pull_request.number || git
55
# Controls when the workflow will run
66
on:
77
pull_request:
8-
types: [opened, synchronize, reopened]
8+
types: [synchronize, reopened]
99
issue_comment:
1010
types: [created]
1111
workflow_dispatch:
@@ -26,7 +26,6 @@ jobs:
2626
deploy:
2727
if: |
2828
(github.event_name == 'pull_request') ||
29-
(github.event_name == 'push') ||
3029
(github.event_name == 'workflow_dispatch') ||
3130
(github.event_name == 'issue_comment' &&
3231
github.event.issue.pull_request &&
@@ -41,34 +40,22 @@ jobs:
4140
env:
4241
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4342
run: |
44-
# For push events, try to find associated PR first
45-
if [[ "${{ github.event_name }}" == "push" ]]; then
46-
PR_DATA=$(gh pr list --head "${{ github.ref_name }}" --json number,headRefName,headRefOid --jq '.[0]')
47-
if [[ -n "$PR_DATA" ]]; then
48-
PR_NUMBER=$(echo "$PR_DATA" | jq -r .number)
49-
else
50-
echo "No PR found for branch ${{ github.ref_name }}, skipping deployment"
51-
echo "DO_DEPLOY=false" >> $GITHUB_ENV
52-
exit 0
53-
fi
54-
else
55-
# Get PR number based on event type
56-
case "${{ github.event_name }}" in
57-
"workflow_dispatch")
58-
PR_NUMBER="${{ github.event.inputs.pr_number }}"
59-
;;
60-
"issue_comment")
61-
PR_NUMBER="${{ github.event.issue.number }}"
62-
;;
63-
"pull_request")
64-
PR_NUMBER="${{ github.event.pull_request.number }}"
65-
;;
66-
*)
67-
echo "Error: Unsupported event type ${{ github.event_name }}"
68-
exit 1
69-
;;
70-
esac
71-
fi
43+
# Get PR number based on event type
44+
case "${{ github.event_name }}" in
45+
"workflow_dispatch")
46+
PR_NUMBER="${{ github.event.inputs.pr_number }}"
47+
;;
48+
"issue_comment")
49+
PR_NUMBER="${{ github.event.issue.number }}"
50+
;;
51+
"pull_request")
52+
PR_NUMBER="${{ github.event.pull_request.number }}"
53+
;;
54+
*)
55+
echo "Error: Unsupported event type ${{ github.event_name }}"
56+
exit 1
57+
;;
58+
esac
7259
7360
if [[ -z "$PR_NUMBER" ]]; then
7461
echo "Error: Could not determine PR number"
@@ -125,6 +112,9 @@ jobs:
125112
126113
# Check if app exists and save state
127114
if ! cpflow exists -a ${{ env.APP_NAME }}; then
115+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
116+
exit 0
117+
fi
128118
echo "APP_EXISTS=false" >> $GITHUB_ENV
129119
else
130120
echo "APP_EXISTS=true" >> $GITHUB_ENV

‎.github/workflows/help-command.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
const sections = {
2828
commands: {
2929
deploy: {
30-
title: '## `/deploy`',
30+
title: '## `/deploy-review-app`',
3131
purpose: '**Purpose:** Deploy a review app for your pull request',
3232
details: [
3333
'**What it does:**',
@@ -43,7 +43,7 @@ jobs:
4343
]
4444
},
4545
destroy: {
46-
title: '## `/destroy`',
46+
title: '## `/delete-review-app`',
4747
purpose: '**Purpose:** Remove the review app for your pull request',
4848
details: [
4949
'**What it does:**',
@@ -94,9 +94,9 @@ jobs:
9494
cleanup: {
9595
title: '## Automatic Cleanup',
9696
details: [
97-
'Review apps are automatically destroyed when:',
97+
'Review apps are automatically deleted when:',
9898
'1. The pull request is closed',
99-
'2. The `/destroy` command is used',
99+
'2. The `/delete-review-app` command is used',
100100
'3. A new deployment is requested (old one is cleaned up first)'
101101
]
102102
},

‎client/app/bundles/comments/components/Footer/Footer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default class Footer extends BaseComponent {
1414
</a>
1515
<a href="https://x.com/railsonmaui" className="flex gap-4 items-center">
1616
<div className="w-16 h-16 bg-[url('../images/twitter_64.png')]" />
17-
Rails On Maui on X (Twitter)
17+
Rails On Maui on X
1818
</a>
1919
</div>
2020
</footer>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /