-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
--affected
failing to resolve main
even on full checkout
#9320
Comments
Had a similar issue over on GitLab. The issue was that GitLab Runner will checkout in a detached HEAD mode, which is not a branch, and thus The fix was to set Looking at the logs in your CI, you are also running in a detached HEAD mode, so the above may solve your issue. Alternatively, you could checkout the Since it seems like this can happen pretty easily in both GitLab and GitHub, it might be a good idea for Turborepo to update its docs to talk about this. It took me quite some time to figure this out. |
Thanks for chiming in here @ryanarmstrong! Preferably, I'd like to avoid setting I was curious if Turbo tries to do this for you since apparently |
This comment was marked as spam.
This comment was marked as spam.
So I could be wrong, but I think the reason that it works in GitHub actions without any config is that Turborepo is looking for GItHub variables and knows when it's in CI. So it has built-in support for GitHub actions but not for GitLab CI. I am basing this off of the documentation here. But I can't say this definitively. |
For anyone looking for a solution until the issue gets resolved (based on #800 (reply in thread)): env:
TURBO_SCM_BASE: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }} This will set
|
@miikebar Seems to work for me, thanks for sharing! |
Verify canary release
Link to code that reproduces this issue
https://github.com/amannn/next-intl
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Linux
Which canary version will you have in your reproduction?
2.2.3
Describe the Bug
Using
--affected
results in the following log line:example in GH Actions
Expected Behavior
We shouldn't have get an ambiguous argument when testing out
main
. Especially withfetch-depth: 0
To Reproduce
See
next-intl
attempting to use--affected
: example jobAdditional context
No response
The text was updated successfully, but these errors were encountered: