Skip to content

fix(ci): handle contract check on main pushes - #45

Merged
frahlg merged 1 commit into
mainfrom
fix/ci-contract-push
Aug 12, 2026
Merged

fix(ci): handle contract check on main pushes#45
frahlg merged 1 commit into
mainfrom
fix/ci-contract-push

Conversation

@frahlg

@frahlg frahlg commented Aug 12, 2026

Copy link
Copy Markdown
Member

What changed

Skip the PR body lookup when the contract job runs for a main push. Pull-request runs still read an optional Contract-pair, while push runs use the documented srcfl/ftw@master default.

Root cause

The workflow runs for both pull requests and pushes, but unconditionally evaluated gh pr view "${{ github.event.pull_request.number }}". A push has no pull-request number, so this became gh pr view "" and failed before either drift comparison ran.

Impact

Post-merge CI can now execute the actual registry and token comparisons instead of failing during event setup.

Validation

  • simulated a push with an empty PR number and proved gh is not called and master is selected
  • simulated a PR body with Contract-pair: srcfl/ftw@paired-branch and proved that branch is selected
  • git diff --check

@frahlg
frahlg marked this pull request as ready for review August 12, 2026 12:12
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ftw-webapp fd66a77 Commit Preview URL

Branch Preview URL
Aug 12 2026, 12:12 PM

@frahlg
frahlg merged commit 2fbee38 into main Aug 12, 2026
3 checks passed
@frahlg
frahlg deleted the fix/ci-contract-push branch August 12, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant