Skip to content

ci: squash-merge Dependabot PRs once their checks pass - #45

Merged
Baspa merged 7 commits into
mainfrom
fix/dependabot-squash-merge
Nov 13, 2026
Merged

Baspa merged 7 commits into
mainfrom
fix/dependabot-squash-merge

Conversation

@Baspa

@Baspa Baspa commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

What

The Dependabot auto-merge job has never merged anything: it used gh pr merge --merge, and the "Require linear history" ruleset rejects merge commits (GraphQL: Merge commits are not allowed on this repository.). Every earlier Dependabot PR was merged by hand.

  • One step for semver-minor and semver-patch updates (was two identical steps).
  • Waits for the PR's own checks instead of merging blind: repo auto-merge is off and main has no required checks, so --auto would merge immediately. The job polls statusCheckRollup (check runs and commit statuses, excluding its own workflow) until both the Tests and PHPStan workflows have registered checks and all checks have finished, then:
    • merges only when every check finished as success/skipped/neutral;
    • leaves the PR open and fails the job when a check fails or is cancelled.
      A failed gh call is retried on the next poll; the 30-minute job timeout bounds the wait.
  • Runs only for PRs opened by Dependabot (pull_request.user.login, not the event actor), and a concurrency group per PR cancels the older poller when Dependabot rebases.
  • Merges with --squash --match-head-commit, so a Dependabot rebase during the wait cannot merge an untested head.
  • Drops --auto, which errors when mergeability is still unknown because auto-merge is disabled on the repo.
  • Job timeout 5 → 30 minutes; adds checks: read and statuses: read.

Works together with #52, which makes Tests and PHPStan run for workflow-only PRs (GitHub Actions bumps), so those PRs have checks to wait for.

Tests

YAML validated; the polling jq was dry-run against PR #34's real check data (6 checks, all passed → would merge) and against a synthetic failed check (→ reported, no merge). The real end-to-end check is #34: after this merges, @dependabot rebase on #34 re-triggers the job.

Closes #37

@Baspa Baspa self-assigned this Nov 13, 2026
Allow Pest 3.8/4/5 so every supported PHP version resolves, drop the always-on coverage and junit reports from phpunit.xml.dist, add PHP 8.5 to the matrices and run Tests and PHPStan on pull requests (push only on main).
@Baspa Baspa changed the title ci: squash-merge Dependabot PRs (linear history ruleset) ci: squash-merge Dependabot PRs once their checks pass Nov 13, 2026
@codecov-commenter

codecov-commenter commented Nov 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.85%. Comparing base (c410bf4) to head (f0fbc6b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main      #45   +/-   ##
=========================================
  Coverage     92.85%   92.85%           
  Complexity       40       40           
=========================================
  Files             4        4           
  Lines           168      168           
=========================================
  Hits            156      156           
  Misses           12       12           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Baspa
Baspa merged commit 2149d0a into main Nov 13, 2026
21 checks passed
@Baspa
Baspa deleted the fix/dependabot-squash-merge branch November 13, 2026 12:05
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.

Dependabot auto-merge fails: merge commits are blocked by the linear-history ruleset

2 participants