Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Based on documentation, I expect the first pre_workflow_hooks key to be overridden by the /.*rancher/ config
Reproduction Steps
with configuration defined as previously
create a merge request in a repo that matches the rancher rule
Expected: only the pre_workflow_hooks from rancher should be executed
Actual: both pre_workflow_hooks are executed
Logs
Logs
```
{"level":"info","ts":"2024-05-17T10:15:45.850Z","caller":"events/working_dir.go:239","msg":"creating dir \"/atlantis-data/repos/rancher/10/default\"","json":{}}
{"level":"info","ts":"2024-05-17T10:15:48.081Z","caller":"runtime/pre_workflow_hook_runner.go:80","msg":"successfully ran \"sh -c echo 'running default flow...'\" in \"/atlantis-data/repos/rancher/10/default\"","json":{"repo":"rancher","pull":"10"}}
{"level":"info","ts":"2024-05-17T10:15:57.153Z","caller":"runtime/pre_workflow_hook_runner.go:80","msg":"successfully ran \"sh -c echo 'running rancher flow'\" in \"/atlantis-data/repos/rancher/10/default\"","json":{"repo":"rancher","pull":"10"}}
{"level":"info","ts":"2024-05-17T10:16:01.847Z","caller":"events/project_command_builder.go:427","msg":"successfully parsed atlantis.yaml file","json":{"repo":"rancher","pull":"10"}}
{"level":"info","ts":"2024-05-17T10:16:01.847Z","caller":"events/project_command_builder.go:467","msg":"1 projects are to be planned based on their when_modified config","json":{"repo":"rancher","pull":"10"}}
```
Environment details
Additional Context
I also find the wording of the documentation a bit weird
If multiple repos match, the last match will apply. -> I first though that only the last config will be used
If a key isn't defined, it won't override a key that matched from above. For example, given a repo ID github.com/owner/repo and a config -> but in fact, all matching repos will be used, merged and the last value of each key is used
Community Note
Overview of the Issue
I defined the following server-side repo config
Based on documentation, I expect the first
pre_workflow_hooks
key to be overridden by the/.*rancher/
configReproduction Steps
rancher
ruleExpected: only the
pre_workflow_hooks
fromrancher
should be executed Actual: bothpre_workflow_hooks
are executedLogs
Logs
``` {"level":"info","ts":"2024-05-17T10:15:45.850Z","caller":"events/working_dir.go:239","msg":"creating dir \"/atlantis-data/repos/rancher/10/default\"","json":{}} {"level":"info","ts":"2024-05-17T10:15:48.081Z","caller":"runtime/pre_workflow_hook_runner.go:80","msg":"successfully ran \"sh -c echo 'running default flow...'\" in \"/atlantis-data/repos/rancher/10/default\"","json":{"repo":"rancher","pull":"10"}} {"level":"info","ts":"2024-05-17T10:15:57.153Z","caller":"runtime/pre_workflow_hook_runner.go:80","msg":"successfully ran \"sh -c echo 'running rancher flow'\" in \"/atlantis-data/repos/rancher/10/default\"","json":{"repo":"rancher","pull":"10"}} {"level":"info","ts":"2024-05-17T10:16:01.847Z","caller":"events/project_command_builder.go:427","msg":"successfully parsed atlantis.yaml file","json":{"repo":"rancher","pull":"10"}} {"level":"info","ts":"2024-05-17T10:16:01.847Z","caller":"events/project_command_builder.go:467","msg":"1 projects are to be planned based on their when_modified config","json":{"repo":"rancher","pull":"10"}} ```Environment details
Additional Context
I also find the wording of the documentation a bit weird
If multiple repos match, the last match will apply.
-> I first though that only the last config will be usedIf a key isn't defined, it won't override a key that matched from above. For example, given a repo ID github.com/owner/repo and a config
-> but in fact, all matching repos will be used, merged and the last value of each key is used