-
Notifications
You must be signed in to change notification settings - Fork 14
fix(ci): use origin/main as nx affected base for stacked PRs #369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jumski
commented
Nov 16, 2025
- Remove push trigger (CI only runs on PRs, merge queue validates main)
- Replace nx-set-shas with hardcoded origin/main base
- Fixes issue where topmost PR in stack tested against wrong base causing red main
- Keep changeset-release/** exclusion (workspace:* deps make CI redundant)
🦋 Changeset detectedLatest commit: 1f7d0ef The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
View your CI Pipeline Execution ↗ for commit 1f7d0ef
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: Set Nx base for affected commands | ||
| run: | | ||
| echo "NX_BASE=origin/main" >> $GITHUB_ENV | ||
| echo "NX_HEAD=HEAD" >> $GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set NX_BASE to ref that is never fetched
The workflow now hardcodes NX_BASE=origin/main (lines 45‑48), but the preceding checkout only fetches the PR ref. With actions/checkout@v4 the default ref for pull_request is refs/pull/*/merge, so no origin/main remote is created unless fetched explicitly. On PR runs pnpm nx affected ... --base=origin/main will fail with fatal: ambiguous argument 'origin/main' because that ref does not exist in the local clone, breaking all CI jobs. Please fetch the main branch or derive base/HEAD with an action before setting these env vars.
Useful? React with 👍 / 👎.
- Remove push trigger (CI only runs on PRs, merge queue validates main) - Replace nx-set-shas with hardcoded origin/main base - Fixes issue where topmost PR in stack tested against wrong base causing red main - Keep changeset-release/** exclusion (workspace:* deps make CI redundant)
17752d0 to
1f7d0ef
Compare
🔍 Preview Deployment: Website✅ Deployment successful! 🔗 Preview URL: https://pr-369.pgflow.pages.dev 📝 Details:
_Last updated: _ |
Merge activity
|
- Remove push trigger (CI only runs on PRs, merge queue validates main) - Replace nx-set-shas with hardcoded origin/main base - Fixes issue where topmost PR in stack tested against wrong base causing red main - Keep changeset-release/** exclusion (workspace:* deps make CI redundant)
