Skip to content

Commit e2117d9

Browse files
committed
Fix CI not attaching a "View deployment" button in PRs for build links
1 parent d3f36a9 commit e2117d9

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

.github/workflows/build.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,18 +157,21 @@ jobs:
157157
REF="master"
158158
ENVIRONMENT="graphite-dev (Production)"
159159
else
160-
REF="$(git rev-parse HEAD)"
160+
REF="${{ inputs.checkout_ref || github.head_ref || github.ref_name }}"
161161
ENVIRONMENT="graphite-dev (Preview)"
162162
fi
163-
DEPLOY_ID=$(gh api \
164-
-X POST \
165-
-H "Accept: application/vnd.github+json" \
166-
repos/${{ github.repository }}/deployments \
167-
--input - \
168-
--jq '.id' <<EOF
169-
{"ref":"$REF","environment":"$ENVIRONMENT","auto_merge":false,"required_contexts":[]}
163+
create_deployment() {
164+
gh api \
165+
-X POST \
166+
-H "Accept: application/vnd.github+json" \
167+
repos/${{ github.repository }}/deployments \
168+
--input - \
169+
--jq '.id' <<EOF
170+
{"ref":"$1","environment":"$ENVIRONMENT","auto_merge":false,"required_contexts":[]}
170171
EOF
171-
)
172+
}
173+
# Try branch name first (needed for GitHub's PR "View deployment" button), fall back to commit SHA if the branch was deleted
174+
DEPLOY_ID=$(create_deployment "$REF" 2>/dev/null) || DEPLOY_ID=$(create_deployment "$(git rev-parse HEAD)")
172175
gh api \
173176
-X POST \
174177
-H "Accept: application/vnd.github+json" \

frontend/src/components/window/MainWindow.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
{#if $tooltip.visible}
3434
<Tooltip />
3535
{/if}
36-
{#if import.meta.env.MODE === "native" && new Date() > new Date("2026-04-30")}
36+
{#if import.meta.env.MODE === "native" && new Date() > new Date("2026-07-01")}
3737
<LayoutCol class="release-candidate-expiry">
3838
<TextLabel>
3939
<p>

0 commit comments

Comments
 (0)