You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v3.1.0 github_branch_protection does not apply required_status_checks when set to false #572
basically we have templates which is where read this as json and strict can be true or false - rules are applied based on that and status_context is passed in as well. Right now, it modifies it in each run unless there are contexts set ! Behavior started after upgrade from 2.9.0 to 3.1.0
Thanks for reporting and confirming this behaviour. The switch over from the REST implementation to the GraphQL implementation for this resource has been problematic on various fronts. A revert is being discussed, but it seems the feature of having a wildcard pattern is very much wanted by the community.
Will keep this issue in mind as we discuss next steps on making it less buggy.
The issue is the GraphQL API returns requiresStrictStatusChecks as true when there are no contexts. I'm tantalisingly close to a fix using a DiffSuppressFunc, but a couple edge cases are throwing a spanner in the works.
@guillermotti app support hasn't been added - that's easy enough.
Activity
onurg commentedon Oct 20, 2020
basically we have templates which is where read this as json and
strictcan be true or false - rules are applied based on that and status_context is passed in as well. Right now, it modifies it in each run unless there are contexts set ! Behavior started after upgrade from 2.9.0 to 3.1.0bharathkkb commentedon Oct 31, 2020
I am also seeing this. There is a permadiff for the
required_status_checksblock.jcudit commentedon Nov 4, 2020
Thanks for reporting and confirming this behaviour. The switch over from the REST implementation to the GraphQL implementation for this resource has been problematic on various fronts. A revert is being discussed, but it seems the feature of having a wildcard pattern is very much wanted by the community.
Will keep this issue in mind as we discuss next steps on making it less buggy.
guillermotti commentedon Nov 20, 2020
Any news or actions to be taken on this? It's so annoying this issue. Also happens when we try to add an App as
push_restrictionsIn this case for the v4.0.1 so I guess the error is being propagated throw versions.
I can solve the problem if I add contexts with strict. But if I don't add contexts, it fails with strict as well.
patrickmarabeas commentedon Nov 28, 2020
The issue is the GraphQL API returns
requiresStrictStatusChecksastruewhen there are no contexts. I'm tantalisingly close to a fix using aDiffSuppressFunc, but a couple edge cases are throwing a spanner in the works.@guillermotti app support hasn't been added - that's easy enough.
patrickmarabeas commentedon Nov 28, 2020
I've looked at this for too long to trust my judgment that it indeed works in all cases: https://github.com/terraform-providers/terraform-provider-github/pull/614
patrickmarabeas commentedon Nov 28, 2020
Adding Apps as actor types in branch protection push restrictions: https://github.com/terraform-providers/terraform-provider-github/pull/615