-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add a flag or some setting that ignores the logic for CI #3518
Add a flag or some setting that ignores the logic for CI #3518
Comments
Hi @effektsvk, How are you currently running these "dry run release on PRs (specifically Renovate PRs)"!? I'd assume its through GitHub Actions!? i.e. you are running Are you leveraging the Note:
|
Hi, Yes, it is GitHub Actions running on GitHub PRs. We run We're also using a custom config which sets the Using the |
Please do, and make it public too |
Hi @babblebey, I finished the reproduction, I made 5 versions of workflows, all of them have
Both workflows with Both workflows with Here is the link for the PR with the results: edit: the repo is on my work account, that's why the username is different |
New feature motivation
We would like to run a dry run release on PRs (specifically Renovate PRs), so that when some dependency update breaks the release we can see it before it's merged.
From what I've gathered, the flow is something like this:
semantic-release
detects whether it's running in CI usingenv-ci
package withdetect
functionsenv-ci/services/github.js
for parsing the branch name, but this results in the branch name:refs/pull/PR_NUMBER/merge
semantic-release
there isgetBranches
function which fetches all branches but sincerefs/pull/PR_NUMBER/merge
is not a normal branch, it doesn't count it, even if I add it tobranches
in.releaserc.js
semantic-release/index.js
Line 68 in 656a1a4
I found a workaround that if I unset
GITHUB_ACTIONS
env variable, it works as we need it. It only makes thedetect
function inenv-ci
package think that it's running locally.https://github.com/semantic-release/env-ci/blob/14ca551218ab5c0ad5bddb14ab0bc154c8be727f/services/github.js#L36-L38
Maybe the issue is more related to
env-ci
package thansemantic-release
itself, but I needsemantic-release
to behave in a certain way so I created the issue here. I can move if necessary.P.S. It also might be slightly related to this issue: #3278
New feature description
I'm not sure what is the best way to solve this, whether it's some kind of flag/setting I can pass to
semantic-release
or maybe an environment variable so thatenv-ci
has access to it andsemantic-release
can remain untouched. Maybe you can come up with a different solution.New feature implementation
No response
The text was updated successfully, but these errors were encountered: