fix(branch_protection_v3): ignore context when value exists in checks
Resolves #1701
Before the change?
github_branch_protection_v3 flattens all contexts even if they're only configured in checks and if contexts field is empty in required_status_checks.
After the change?
If the context is already in checks, it's not parsed into context field.
Pull request checklist
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been reviewed and added / updated if needed (for bug fixes / features)
Does this introduce a breaking change?
- [ ] Yes
- [X] No
It doesn't break anything since contexts in checks are still applied and they'll be applied by GitHub to contexts.
@jporzucek Is there an Update on this PR we are waiting heavily on this fix :) @kfcampbell
@kfcampbell Can you take a look at this PR when you have a chance pls? 🙏
would be super duper awesome if someone could put eyes on this PR that potentially fixes a super annoying bug. Pretty disappointing that this has been sitting open since april.
@jporzucek I've been able to fix this issue in the acceptance tests by setting Computed: true for both contexts & checks which AFAIK is the idiomatic solution. So I don't think you need this additional code.