terraform-provider-github
terraform-provider-github copied to clipboard
Add allow_force_pushes, allow_deletions and require_linear_history
Closes #305.
There is an inconsistency in the naming of the require_linear_history
property. The documentation writes it as required_linear_history
(required). The Go GitHub Client defines it as require. I actually think require makes more sense as its a boolean value and not a list of required values. I'm also fine with changing it though, so let me know.
Output of acceptance tests:
=== RUN TestAccGithubBranchProtection_basic
=== PAUSE TestAccGithubBranchProtection_basic
=== CONT TestAccGithubBranchProtection_basic
--- PASS: TestAccGithubBranchProtection_basic (22.06s)
PASS
ok github.com/terraform-providers/terraform-provider-github/github 22.083s
Thanks for the feedback @anGie44. I made some changes including a set of tests specifically for the optional attributes. Is this what you had in mind?
Hey Could this be merged soon please 👍 :)
Looks like recent updates to the branch protection plumbing has added conflicts to this PR. I've got this queued to address this week, but welcome anyone else jumping in to remove conflicts.
On further reading, we are running into an incompatibility between the v3
and graphql
APIs. GitHub has support queued for the createBranchProtection
mutation, while this is already supported via the v3
route. I have notified the team prioritizing the fix and will push this back a release 🙃 .
+1 for require_linear_history
with github_branch_protection_v3
resource doesn't support it and same goes for github_branch_protection
resource
it's a step that is needed for repo creation and not having to do an out of band tweak.
When will this be available ?
Curious about the progress on this PR, with the branch protection concerns resolved (now that there are two separate resources for graphql/v3 branch protections), could we maybe merge this in?
cc: @jcudit
@k24dizzle added a comment to the underlying issue over in: https://github.com/integrations/terraform-provider-github/issues/305#issuecomment-814084663.
I recommend we can proceed with a new PR that adds the features to the GraphQL version of this resource as this one is quite outdated. Possibly something I have time for this week, but would ❤️ a community contribution as well.
Would be really great to be able to use this feature.
I wanted to stop managing repositories config by hand and move to terraform for it but the lack of require_linear_history
is blocking me from doing so :/
Any update on this PR ? require_linear_history
is still a blocker :/
This feature will likely land on the latest branch_protection
resource rather than the legacy branch_protection_v3
resource. We do not look far off from this landing, so please track https://github.com/integrations/terraform-provider-github/issues/649 for further progress.
Appreciate the patience on this one 🙇🏾
👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned
label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!
I would think this should stay open seeing as how a community member wrote the code and a maintainer agreed that this should be accepted into the project.
I would think this should stay open seeing as how a community member wrote the code and a maintainer agreed that this should be accepted into the project.
Sorry, just because i got confused by this, I'll mention that this PR is now really old and the 3 fields it adds now exist in the code, obviously via a different PR, so i think it should be unpinned and closed to avoid future confusion.