Skip to content

chore(ci): run CI only on pull requests targeting main - #104

Merged
mathieumaf merged 1 commit into
mainfrom
claude/ci-check-merge-branches-z15dws
Sep 7, 2026
Merged

chore(ci): run CI only on pull requests targeting main#104
mathieumaf merged 1 commit into
mainfrom
claude/ci-check-merge-branches-z15dws

Conversation

@mathieumaf

@mathieumaf mathieumaf commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Description

ci.yml was triggered on both push to main and pull_request against main, so every merge ran the same 2-node matrix twice — once for the PR, once for the resulting push — for identical commits.

On top of that, release.yml already runs the full lint / typecheck / format:check / build / test suite on every push to main before handing over to changesets, so the push-triggered CI run was doubly redundant.

This PR drops the push trigger from ci.yml, leaving pull_request: branches: [main]. Nothing is pushed directly to main except merges, so no commit loses coverage:

  • Pre-merge: CI runs on the PR (unchanged).
  • Post-merge: release.yml runs the same checks on main.

A comment in the workflow records why the push trigger is intentionally absent.

Related issue

N/A

Type of change

  • Refactoring (CI configuration)

Checklist

  • Code compiles without errors (npm run build) — no source changes
  • Linter passes (npm run lint) — no source changes
  • Code is formatted (npm run format:check)
  • Added/updated tests — not applicable, CI config only
  • Added a changeset — not applicable, no user-visible change
  • Updated documentation — the rationale is documented in the workflow itself
  • Tested manually — see below

How to test

  1. Confirm this PR triggers exactly one CI / build run per Node version (22, 24), and no duplicate run appears in the Actions tab.
  2. After merge, confirm no CI workflow run is created for the push to main, and that Release still runs its lint/typecheck/format/build/test steps.
  3. If CI / build is configured as a required status check on main in branch protection, it stays satisfied — the checks still report on the PR head, which is what protection evaluates.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YRkjpsg8UyhP7a9sYLHmss


Generated by Claude Code

Summary by CodeRabbit

  • Chores
    • Continuous integration now runs for pull requests targeting the main branch instead of direct pushes.
    • Existing build, linting, type-checking, formatting, and test checks remain unchanged.

CI was triggered on both `push` to `main` and `pull_request` against
`main`, so every merge ran the same matrix twice. Nothing is pushed
directly to `main` except merges, and `release.yml` already re-runs the
full lint/typecheck/format/build/test suite on each push to `main`, so
the push trigger added no signal and only burned Actions minutes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YRkjpsg8UyhP7a9sYLHmss
@changeset-bot

changeset-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8684233

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 48162d8f-70d7-4bf0-93d8-b18f923652fa

📥 Commits

Reviewing files that changed from the base of the PR and between 8361806 and 8684233.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The CI workflow no longer runs on direct pushes to main. It continues to run for pull requests targeting main. The build matrix and validation steps remain unchanged.

Changes

CI trigger update

Layer / File(s) Summary
Restrict CI to pull requests
.github/workflows/ci.yml
The workflow removes the push trigger for main and retains the pull request trigger targeting main. The existing Node.js 22/24 checks remain unchanged.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 86842

CI will run for pull requests targeting main rather than duplicate runs after merges, while the post-merge release workflow remains triggered on main. No merge-blocking risk is currently identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: CI now runs only for pull requests targeting main.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/ci-check-merge-branches-z15dws

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mathieumaf
mathieumaf merged commit 0ceb0de into main Sep 7, 2026
6 checks passed
@mathieumaf
mathieumaf deleted the claude/ci-check-merge-branches-z15dws branch September 7, 2026 18:02
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.

2 participants