-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: gitlab_project module - Allow to update project default branch #7158
feat: gitlab_project module - Allow to update project default branch #7158
Conversation
You also need to update the documentation for The gitlab_project module always stated that Out of curiosity, what happens if you provide a name that doesn't exist as a branch? Does the API rename the current default branch to the new name? Or will it simply create the new branch based on the current default branch? Or will it simply fail? |
Thanks @felixfontein for your feedback. I updated the documentation. It's clearly a breaking change, since the module will update a field it did not before this PR. If the provided branch does not exist, the GitLab API will return an HTTP 400 error like that :
A branch rename (like |
f6b3b24
to
1e6e9d8
Compare
7cab6a5
to
a7d7e3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would extend the changelog fragment a bit to point out in which cases users could see unexpected breaking changes; besides that everything looks good!
changelogs/fragments/7158-gitlab-project-default-branch-update.yml
Outdated
Show resolved
Hide resolved
ad6665c
to
d548441
Compare
@felixfontein I applied your suggestions, thanks ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I will merge this in a few days if nobody objects.
@lgatellier thanks for implementing this! |
SUMMARY
This PR allow gitlab_project module to update a GitLab project's default branch.
ISSUE TYPE
COMPONENT NAME
gitlab_project module
ADDITIONAL INFORMATION
Fixes #5995