Per the documentation, include-branches should be able to override exclude-branches, but this was not the case in the way the code was written. Rework the code to correct this, and also add a test to ensure it works as documented Change-Id: I2e23b1533c67ccf84b4d6a36f5a003adc7b3e45achanges/97/871197/3
parent
944b9852c9
commit
a557e140b1
@ -0,0 +1,12 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Fixes `tenant.untrusted-projects.<project>.include-branches` being lower
|
||||
priority than `tenant.untrusted-projects.<project>.exclude-branches` to
|
||||
match the documentation and expected user behavior.
|
||||
|
||||
This only affects projects that are using both `include-branches` and
|
||||
`exclude-branches` at the same time. Now, `include-branches` has priority
|
||||
over `exclude-branches` for any branches that match both. Practically
|
||||
speaking, this means that `exclude-branches` is ignored if
|
||||
`include-branches` is set.
|
@ -0,0 +1,16 @@
|
||||
- tenant:
|
||||
name: tenant-one
|
||||
source:
|
||||
gerrit:
|
||||
config-projects:
|
||||
- common-config
|
||||
untrusted-projects:
|
||||
- org/project1:
|
||||
exclude-branches:
|
||||
- foo
|
||||
- bar
|
||||
# Include branches has higher priority than exclude branches
|
||||
include-branches:
|
||||
- foo
|
||||
- bar
|
||||
- org/project2
|
Loading…
Reference in new issue