Skip to content

Conversation

beekeep
Copy link
Collaborator

@beekeep beekeep commented Feb 19, 2022

Issue 709 requested the allow_force_push option to be added to the branch protection resource. These changes add that feature, along with the appropriate tests. The API does not support updating the allow force push configuration, so any changes will force a new resource to be created.

Description

Closes #709 . Adds allow_force_push attribute to branch protection resource.

PR Checklist

  • Resource attributes match 1:1 the names and structure of the API resource in the GitLab API documentation.
  • Examples are updated with:
    • A *.tf file for the resource/s with at least one usage example
    • A *.sh file for the resource/s with an import example (if applicable)
  • New resources have at minimum a basic test with three steps:
    • Create the resource
    • Update the attributes
    • Import the resource
  • No new //lintignore comments that came from copied code. Linter rules are meant to be enforced on new code.

Issue 709 requested the `allow_force_push` option to be added to the branch protection resource.  These changes add that feature, along with the appropriate tests.  The API does not support updating the allow force push configuration, so any changes will force a new resource to be created.
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome @beekeep 👋

It looks like this is your first submission to the Terraform GitLab Provider! If you haven’t already done so, please make sure you have checked out our CONTRIBUTING.md guide to make sure your contribution has all the necessary elements in place for a successful approval.

Thanks again, and welcome to the community! 😃

@beekeep
Copy link
Collaborator Author

beekeep commented Feb 19, 2022

@armsnyder , @timofurrer, @nagyv This is ready for your review. Let me know if there is anything I need to change. Thanks!

Copy link
Member

@timofurrer timofurrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change! Looks good to me!

Comparing with the upstream API I've noticed that we are also missing the allowed_to_unprotect field. I've created #878 - in case you want to implement this in a separate PR 🎉

@beekeep
Copy link
Collaborator Author

beekeep commented Feb 19, 2022

@timofurrer I noticed that attribute missing as well, but figured I would keep this PR to just the one attribute. I will get another PR ready to add the allowed_to_unprotect attribute.

@github-actions
Copy link

This functionality has been released in v3.10.0 of the Terraform GitLab Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue. Thank you!

@beekeep beekeep deleted the feat_branch_protection_force_push branch February 24, 2022 15:18
@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

2 participants