feat: add merge request checks, see #54#57
Conversation
Co-authored-by: Copilot <copilot@github.com>
Coverage |
There was a problem hiding this comment.
Pull request overview
Adds configurable GitLab “merge request checks” to generated projects, controlled via mergeRequest configuration keys (see #54), and updates tests/docs accordingly.
Changes:
- Extend
config.MergeRequestwith booleans for merge checks and parse them from Viper config. - Apply these merge-check settings when creating GitLab projects via
CreateProjectOptions. - Update CLI output (
Show()), docs, and add/extend tests covering parsing, display, and GitLab request payloads.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
gitlab/projects.go |
Passes merge-check booleans into GitLab project creation options. |
gitlab/projects_contract_test.go |
Contract test asserting merge-check fields are present in the create-project request body. |
config/types.go |
Adds merge-check boolean fields to MergeRequest. |
config/assignment.go |
Reads merge-check booleans from config (mergeRequest.*) into MergeRequest. |
config/assignment_test.go |
Tests default false values and config-driven true values for merge checks. |
config/show.go |
Displays merge-check settings in Show() output. |
config/urls_show_test.go |
Adds Show() output test coverage for the new merge-check fields. |
docs/getting-started.md |
Documents default values for new mergeRequest.* keys. |
docs/configuration.md |
Documents new merge-check keys and includes them in examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| mergeRequestCfg := aurora.Sprintf(aurora.Cyan(` | ||
| %s %s | ||
| %s %s`), | ||
| %s %s | ||
| %s %s | ||
| %s %t | ||
| %s %t | ||
| %s %t | ||
| %s %t`), | ||
| aurora.Cyan("MergeMethod:"), | ||
| aurora.Yellow(mergeMethod), | ||
| aurora.Cyan("SquashOption:"), | ||
| aurora.Yellow(squashOption), | ||
| aurora.Cyan("PipelineMustSucceed:"), | ||
| aurora.Yellow(pipelineMustSucceed), | ||
| aurora.Cyan("SkippedPipelinesAreSuccessful:"), | ||
| aurora.Yellow(skippedPipelinesAreSuccessful), | ||
| aurora.Cyan("AllThreadsMustBeResolved:"), | ||
| aurora.Yellow(allThreadsMustBeResolved), | ||
| aurora.Cyan("StatusChecksMustSucceed:"), | ||
| aurora.Yellow(statusChecksMustSucceed), |
There was a problem hiding this comment.
The format string uses %t for the merge-check values, but the arguments passed are aurora.Yellow(<bool>) (an aurora.Value), not a bool. This will render as %!t(...) and likely breaks Show() output (and the new test). Use %s (and keep coloring), or keep %t but pass the raw bools (and optionally colorize via aurora.Sprintf/string conversion).
No description provided.