Skip to content

fix(issuable note): respect editor from config

Jay McCure requested to merge jmc-7567 into main

Description

Uses the editor defined in glab's config for adding an issue/mr note.

Previously it would ignore config for these commands and use the default of the survey package. (However, environment variables worked)

This was because these commands were using survey.Editor rather than surveyext.GLabEditor which has an additional option to set the EditorCommand

Related discussion: #7567 (comment 1965232255)

Related Issues

Resolves #7567 (closed)

How has this been tested?

Added a check in the unit tests to check that the browser from the config is being passed into the prompt.

scenario screenshot
mr note with editor in config Screenshot_2024-06-28_at_21.48.37
mr note with env var Screenshot_2024-06-28_at_21.49.18
issue note with editor in config Screenshot_2024-06-28_at_21.51.00
issue note with env var Screenshot_2024-06-28_at_21.51.06

Screenshots (if appropriate):

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)
  • Test gap
Edited by Jay McCure

Merge request reports