[go: up one dir, main page]

Skip to content

fix(mr create --related-issue): use specified title and description

Description

Previously, the following commands would ignore the given title and description and use the title from the issue, and overwrite description with Closes #<id>.

  • glab mr create --related-issue <id> --title foo --description bar
  • glab mr create -i <id> --title foo --description bar

With this change, --title is used if also passed alongside --related-issue rather than the issue title. Closes #<id> is appended to the description rather than overwriting --description.

Also while writing tests for this I had to fix #1117 (closed) which caused all MRs to be set to draft even when --draft wasn't passed.

Related Issues

Closes #1117 (closed) Closes #1110 (closed)

How has this been tested?

There were no tests for related issues so I had to add the following:

Added two new tests: TestNewCmdCreate_RelatedIssueWithTitle TestNewCmdCreate_RelatedIssueDraft

Screenshots (if appropriate):

test screenshot
Related issue as draft Screen_Shot_2022-11-24_at_15.59.39
Related issue Screen_Shot_2022-11-24_at_15.58.46
Related issue with title and description Screen_Shot_2022-11-24_at_15.57.38

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)
Edited by Jay McCure

Merge request reports

Loading