Open wxiaoguang opened 5 months ago
If I understand you correctly that's intended. For PRs, the branch is the PR target branch.
From docs about the env var:
commit branch (equals target branch for pull requests)
But it is quite counter-intuitive that a non-main branch runs with when: branch: main
.
I think the filter should be respected.
Expected behavior: such event should be skipped
But it is quite counter-intuitive that a non-main branch runs with when: branch: main.
And what's the branch if it's a PR from a fork?
This is also described in the docs: https://woodpecker-ci.org/docs/usage/workflow-syntax#branch
The step now triggers on main branch, but also if the target branch of a pull request is
main
. Add an event condition to limit it further to pushes on main only.
Thank you, but it is just counter-intuitive at first glance ....
Might actually make a bit more sense to have branch
= source branch
instead of target branch
. That would however be a breaking change we could only consider for 3.0
Should I reopen this issue?
Sure if that's a thing you would like to be changed.
I can see there could also be breaking changes in 2.x, eg: Use map on all environment keys in our config https://github.com/woodpecker-ci/woodpecker/pull/3500#issuecomment-2024396711
So is it possible to take this breaking change in 2.5.x ?
How, did I removed that. 🤔 Sorry @qwerty287 that wasn't on purpose.
The comment was basically:
I can see there could also be breaking changes in 2.x, eg: Use map on all environment keys in our config https://github.com/woodpecker-ci/woodpecker/pull/3500#issuecomment-2024396711
This should not be a breaking change and might be a bug, if so we should open a new issue.
So is it possible to take this breaking change in 2.5.x ?
As it is a breaking change, we can only change that in version 3.0
I can see there could also be breaking changes in 2.x, eg: Use map on all environment keys in our config #3500 (comment)
This should not be a breaking change and might be a bug, if so we should open a new issue.
OK, I managed to figure it out .... I guess it is the changed behavior of handling dots .
in environment names (no idea what it is related to, maybe related to docker)
For example: ES 7 documents use "environment: node.name=..." https://www.elastic.co/guide/en/elasticsearch/reference/7.17/docker.html . These environments don't work for the latest.
Describe the bug
Somewhat related to " PR triggers the CI twice #2888 ".
To reproduce:
main
branch:new-branch
based on main and open a PR on Giteanew-branch
branchpull_request_sync
event for the PR branchnew-branch
, it still runs it and considers it asmain
branchSystem Info
Additional context
No response
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]