Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for gitlab branch protection #68

Merged
merged 40 commits into from
May 2, 2019

Conversation

waseem-h
Copy link
Contributor

I've added gitlab branch protection support since it was needed for our usecase and others might also require it. We're using a local binary of this instead of the global release for now. We want it to be merged so that our dependency on a local binary is removed.

@ghost ghost added the size/M label Nov 27, 2018
@waseem-h
Copy link
Contributor Author

@radeksimko @grubernaut @roidelapluie Please take a look

@waseem-h
Copy link
Contributor Author

@radeksimko @grubernaut @roidelapluie Please review

@grubernaut
Copy link
Contributor

hey @waseem-h would love to, but I left Hashicorp over a year ago. Will likely need a current employee to review this for you. 😄

@roidelapluie
Copy link
Collaborator

Please add acceptance tests :)

@roidelapluie
Copy link
Collaborator

Missing:

  • Documentation
  • Acceptance test

Thanks!!

)

func resourceGitlabBranchProtection() *schema.Resource {
acceptedAccessLevels := []string{
Copy link

Choose a reason for hiding this comment

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

How could I set access level to "No one"?

Copy link
Collaborator

Choose a reason for hiding this comment

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

is it possible to get that list from elsewhere?

Copy link

Choose a reason for hiding this comment

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

Could you please add no one and maintainer here?

Copy link

@ahmadiq ahmadiq Mar 15, 2019

Choose a reason for hiding this comment

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

is it possible to get that list from elsewhere?

@roidelapluie should we sync the branch with the upstream master and then use the accessLevel map from https://github.com/terraform-providers/terraform-provider-gitlab/blob/master/gitlab/util.go#L140

@mcanevet
Copy link

mcanevet commented Feb 2, 2019

Once https://github.com/terraform-providers/terraform-provider-gitlab/pull/83 is merged, we should be able to add no one to acceptedAccessLevels.

@roidelapluie
Copy link
Collaborator

roidelapluie commented Feb 8, 2019

#83 is merged but there is still no acceptance tests for this PR

@ghost ghost added size/XL and removed size/M labels Apr 24, 2019
@usamaahmadkhan
Copy link
Contributor

@roidelapluie there is a 401 error in test case

TestAccDataGitlabProject_basic

which is causing the pipeline to fail subsequently. Can you please look into this?

@ghost ghost added the documentation label Apr 24, 2019
@usamaahmadkhan
Copy link
Contributor

@roidelapluie @bilby91 @mcanevet can you plz take a look?

@roidelapluie
Copy link
Collaborator

pending #118 is merged for green CI test

@roidelapluie roidelapluie reopened this May 2, 2019
@ghost ghost added size/XXL dependencies and removed size/XL labels May 2, 2019
@roidelapluie roidelapluie merged commit 11c7e32 into gitlabhq:master May 2, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.