Skip to content

Conversation

@bilby91
Copy link
Contributor

@bilby91 bilby91 commented Dec 14, 2018

New options:

  • merge_method
  • only_allow_merge_if_pipeline_succeeds
  • only_allow_merge_if_all_discussions_are_resolved

@ghost ghost added the size/L label Dec 14, 2018
@bilby91 bilby91 force-pushed the add-more-project-options branch from a02a159 to 5e6f093 Compare December 14, 2018 03:47
@bilby91
Copy link
Contributor Author

bilby91 commented Dec 18, 2018

Is there any release process in place for this project ?

@roidelapluie
Copy link
Collaborator

Yes but we need to wait for hashicorp end of christmas freeze

@mcanevet
Copy link

@bilby91 I go this error when trying to set merge_method => "ff":

400 {error: jobs_enabled, resolve_outdated_diff_discussions, ci_config_path, container_registry_enabled, default_branch, description, issues_enabled, lfs_enabled, merge_requests_enabled, merge_method, name, only_allow_merge_if_all_discussions_are_resolved, only_allow_merge_if_pipeline_succeeds, path, printing_merge_request_link_enabled, public_builds, request_access_enabled, shared_runners_enabled, snippets_enabled, tag_list, visibility, wiki_enabled, avatar are missing, at least one parameter must be provided}

@bilby91
Copy link
Contributor Author

bilby91 commented Dec 23, 2018

@mcanevet Can you provide more information around your tf files please ? Just by looking at the error I don't see a straight relation with merge_method.

@mcanevet
Copy link

@bilby91 here is my terraform manifest:

resource "gitlab_project" "myproject" {
  name           = "myproject"
  default_branch = "master"
}

And if I just change it to that, I have the error message:

resource "gitlab_project" "myproject" {
  name           = "myproject"
  default_branch = "master"
  merge_method   = "ff"
}

}

if d.HasChange("merge_method") {
options.Visibility = stringToVisibilityLevel(d.Get("merge_method").(string))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
options.Visibility = stringToVisibilityLevel(d.Get("merge_method").(string))
options.MergeMethod = stringToMergeMethod(d.Get("merge_method").(string))

Copy link
Contributor

Choose a reason for hiding this comment

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

@roidelapluie this should resolve @mcanevet issue.

@roidelapluie
Copy link
Collaborator

Any comment on @mcanevet issue?

@mcanevet
Copy link

mcanevet commented Feb 2, 2019

@pdecat your suggestion works. @bilby91 could you please add it to your PR?

@bilby91 bilby91 force-pushed the add-more-project-options branch from 5e6f093 to 4809cf8 Compare February 3, 2019 16:28
@bilby91
Copy link
Contributor Author

bilby91 commented Feb 3, 2019

@mcanevet @pdecat Got that fixed! Rebased with master and fixed tests

@bilby91 bilby91 force-pushed the add-more-project-options branch from 4809cf8 to 61ea7bf Compare February 3, 2019 16:36
@mcanevet
Copy link

mcanevet commented Feb 3, 2019

@roidelapluie could you please merge this?

@bilby91
Copy link
Contributor Author

bilby91 commented Feb 3, 2019

@mcanevet I just realized I didn't update the docs folders. Want me to get that done before merging ?

@mcanevet
Copy link

mcanevet commented Feb 3, 2019

@bilby91 I guess @roidelapluie will ask for it. So if you have some spare time to do it, then please do it.

@roidelapluie
Copy link
Collaborator

Yes please

@bilby91 bilby91 force-pushed the add-more-project-options branch from 61ea7bf to 957063f Compare February 8, 2019 21:45
@ghost ghost added the documentation label Feb 8, 2019
@bilby91 bilby91 force-pushed the add-more-project-options branch from 957063f to 3e7bf8e Compare February 8, 2019 21:49
@bilby91
Copy link
Contributor Author

bilby91 commented Feb 8, 2019

Ping @roidelapluie

Visibility: gitlab.PublicVisibility,
MergeMethod: gitlab.FastForwardMerge,
OnlyAllowMergeIfPipelineSucceeds: true,
OnlyAllowMergeIfAllDiscussionsAreResolved: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

did you run go fmt?

return nil
}
return &value
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

missing whiteline

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think my VSCode tries to do something different than make fmt. I pushed code again and CI is passing. I'm missing something ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

well you should run go fmt + add a blank line here :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we should be good now :)

New options:
  - merge_method
  - only_allow_merge_if_pipeline_succeeds
  - only_allow_merge_if_all_discussions_are_resolved
@bilby91 bilby91 force-pushed the add-more-project-options branch from 3e7bf8e to ef7c88a Compare February 8, 2019 23:45
@roidelapluie roidelapluie merged commit ef7c88a into gitlabhq:master Feb 10, 2019
@roidelapluie
Copy link
Collaborator

Thanks!!

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

Development

Successfully merging this pull request may close these issues.

4 participants