terraform-provider-github icon indicating copy to clipboard operation
terraform-provider-github copied to clipboard

fix(branch_protection_v3): ignore context when value exists in checks

Open jporzucek opened this issue 1 year ago • 2 comments

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 avatar Apr 16 '24 14:04 jporzucek

@jporzucek Is there an Update on this PR we are waiting heavily on this fix :) @kfcampbell

bahag-hammera avatar May 14 '24 09:05 bahag-hammera

@kfcampbell Can you take a look at this PR when you have a chance pls? 🙏

jporzucek avatar May 30 '24 17:05 jporzucek

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.

rsi-mrobinson avatar Nov 01 '24 13:11 rsi-mrobinson

@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.

stevehipwell avatar Dec 03 '24 17:12 stevehipwell