feat: set merge method to: merge | semi_linear | ff#50
Merged
Conversation
Co-authored-by: Copilot <copilot@github.com>
Contributor
Coverage |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for configuring the GitLab project merge strategy via assignment config, and disambiguates “release merge request” config from the new assignment-level merge settings.
Changes:
- Introduce
mergeRequest.mergeMethodat the assignment level (values:merge | semi_linear | ff) and wire it into GitLab project creation (CreateProjectOptions.MergeMethod). - Split release merge-request config into a dedicated
ReleaseMergeRequesttype and update related tests accordingly. - Update CLI
Show()output, integration/contract tests, and documentation to reflect the new configuration.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
gitlab/projects.go |
Maps config.MergeMethod to GitLab API merge method and applies it during project creation. |
config/assignment.go |
Parses mergeRequest.mergeMethod from viper into AssignmentConfig. |
config/types.go |
Adds assignment-level MergeRequest + new MergeMethod enum; introduces ReleaseMergeRequest for release config. |
config/show.go |
Displays merge method in Show() output; adjusts release merge-request rendering. |
config/release.go |
Renames release merge-request parsing function and returns ReleaseMergeRequest. |
docs/configuration.md |
Documents mergeRequest.mergeMethod and supported values. |
gitlab/integration_gitlab_test.go |
Adds integration coverage to verify project MergeMethod is set as configured. |
config/assignment_test.go |
Adds unit tests for parsing merge method + default behavior. |
config/urls_show_test.go |
Updates release MR type usage and adds coverage for Show() merge method output. |
gitlab/report_contract_test.go |
Updates contract test to use ReleaseMergeRequest. |
gitlab/report_helper_contract_test.go |
Updates contract test to use ReleaseMergeRequest. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+16
to
+24
| mergeMethod := MergeCommit | ||
| if cfg.MergeRequest != nil { | ||
| mergeMethod = cfg.MergeRequest.MergeMethod | ||
| } | ||
| mergeRequestCfg := aurora.Sprintf(aurora.Cyan(` | ||
| %s %s`), | ||
| aurora.Cyan("MergeMethod:"), | ||
| aurora.Yellow(mergeMethod), | ||
| ) |
Comment on lines
+155
to
+156
| MergeRequest: %s | ||
| %s %s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.