Skip to content

The open-source app everyone uses to manage agents at work

fix(ci): validate the PR base snapshot (#12449)

Dottac119c4bee6eb
diff --git a/.github/workflows/pr-trusted.yml b/.github/workflows/pr-trusted.yml
index a9564be92d..5a2269e3dc 100644
--- a/.github/workflows/pr-trusted.yml
+++ b/.github/workflows/pr-trusted.yml
@@ -120,17 +120,6 @@ jobs:
live_merge_sha="$(jq -r '.merge_commit_sha // empty' <<< "$pr_json")"
is_commit_sha "$live_merge_sha" || fail_closed 'current pull request has no valid merge SHA'
- base_ref_json="$(gh api \
- -H 'Accept: application/vnd.github+json' \
- -H 'X-GitHub-Api-Version: 2022-11-28' \
- "/repos/paperclipai/paperclip/git/ref/heads/$EVENT_BASE_REF" 2>/dev/null)" \
- || fail_closed 'could not refresh the base branch ref'
-
- jq -e --arg base_sha "$EVENT_BASE_SHA" '
- .object.type == "commit" and .object.sha == $base_sha
- ' <<< "$base_ref_json" >/dev/null 2>&1 \
- || fail_closed 'base branch moved after the triggering event'
-
event_merge_json="$(gh api \
-H 'Accept: application/vnd.github+json' \
-H 'X-GitHub-Api-Version: 2022-11-28' \