Skip to content

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

Jay McCure requested to merge jmc-fix-mr-related-issue-title into main

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. \n\n Closes #<id> is appended to the description rather than overwriting --description with Closes #<id>.

Related Issues

Closes #1110 (closed)

How has this been tested?

There were no tests for related issues so I had to add TestNewCmdCreate_RelatedIssueWithTitle

Screenshots (if appropriate):

test screenshot
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) Closes #1110 (closed)
Edited by Jay McCure

Merge request reports