test(mr note create): cover 8277 usage examples
What does this MR do and why?
Issue #8277 was reported before glab mr note create landed in !3099 (merged). Current main no longer reproduces the old parser failure, but the exact issue examples still had two small gaps:
- no regression coverage for
glab mr note create 1 -R gitlab-org/cli --message ...or the stdin form with-R - no built-in example for reading the note body from a file via shell redirection
This MR adds regression tests for the repo-override and stdin paths from the issue report, and adds glab mr note create 123 < plan.md to the command examples.
Test coverage
- Added repo-override regression tests for the
--messageand stdin forms from #8277. - Ran targeted go tests for
Test_cmdCreate_repoOverride,Test_cmdCreate_stdin, andTest_NewCmdCreate. - Ran
go run ./cmd/glab mr note create 1 -R gitlab-org/cli -m "test"and the stdin form; both now reach MR lookup instead of failing argument parsing. - Ran
make gen-docsafter updating the Cobra examples.
Related issues
Related to #8277 (Note: This issue/work item is no longer reproducible on the latest main).
Edited by Mridankan Mandal