test: have git tests actually use git instead of stubs
See merge request https://gitlab.com/gitlab-org/cli/-/merge_requests/1444
Merged-by: Oscar Tovar <otovar@gitlab.com>
Approved-by: Erran Carey <ecarey@gitlab.com>
Approved-by: Oscar Tovar <otovar@gitlab.com>
Reviewed-by: Gary Holtz <gholtz@gitlab.com>
Reviewed-by: Oscar Tovar <otovar@gitlab.com>
Reviewed-by: Erran Carey <ecarey@gitlab.com>
Co-authored-by: Gary Holtz <gholtz@gitlab.com>
fix(iostreams): correct spelling of COLOR_ENABLED env var in color_test
See merge request https://gitlab.com/gitlab-org/cli/-/merge_requests/1083
Merged-by: Gary Holtz <gholtz@gitlab.com>
Approved-by: Terri Chu <tchu@gitlab.com>
Co-authored-by: Foster Snowhill <2486761-ForstPenguin@users.noreply.gitlab.com>
* feat(git): Allow for overriding the TopLevelDir
This would allow us to use a different output for this command in tests.
Issue #923
* fix: Don't show non-templates when asking chosing
In cases where users have non template files in the .gitlab/[template]/
folder they might will be picked up and displayed.
This fixes that by filtering out all the files that are hidden and don't
end in .md
Issue #923
* feat(cmdutils): Sort templates in alphabetical order
* feat: Add ground work for supporting hyperlinks to iostreams
See GH #812
See https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
for technical details behind the hyperlink escape sequence
For now hyperlinks are enabled as long as long as standard output is a
TTY - we'll want to add some additional detection/flags down the road
* feat: use terminal hyperlinks when listing issues/MRs
See GH #812
* feat(hyperlinks): Add display_hyperlinks config option
* chore(hyperlinks): Clean up Hyperlink API a bit
* feat(hyperlinks): default hyperlinks to off
I think hyperlink display should default to off while the feature is new
so that users can play with it
* feat(hyperlinks): Implement FORCE_HYPERLINKS
Setting the FORCE_HYPERLINKS environment variable forces glab to render
hyperlinks when it can - otherwise, it falls back to display_hyperlinks
from the config, which tells glab whether or not to enable hyperlinks
based on whether or not we're outputting to a TTY.
* fix(hyperlink): accommodate hyperlink OSC in string stripping
* fix: Fix incorrect web_url in fixture data
* test(hyperlink): Add tests for hyperlinks in issues list
* test(hyperlink): Add tests for truncating text with hyperlink OSC
* fix(hyperlinks): accommodate hyperlinks in Truncate
* test(hyperlinks): Add tests for showing hyperlinks in mr list
* docs(hyperlink): Add docs for FORCE_HYPERLINKS and display_hyperlinks
* fix(hyperlinks): simplify truncate algorithm
…while also fixing tableprinter tests, which expect that the first
grapheme provided to Truncate is always preserved
* fix(hyperlinks): Deactivate hyperlinks in auto mode if we're writing to a pager
This is a hot fix to solve where glab still truncates lines with length longer that the specified column width on non-TTYs to improve scriptability
Resolves#706
This adds merge options when merging an MR. The user is given three merge options
- create merge commit
- squash and merge
- rebase and merge
NB: This options are only available on TTYs. On non-ttys, the default is to create a merge commit unless the user explicitly specifies the merge method using the available flag options
So far we have started the pager and then got background color glamour
style from enviorment.
If enviorment value is not set it defaults to auto. Which in turn uses
termenv to resolve background color using some terminal escape code
sequences. The problem with this is that doing this when a pager like
less is running, just doesn't work and leaves less in a broken state.
To fix this we are now checking the background color manually and before
we start the pager.
Issue #636
For default values for e.g. prompts, Survey uses the literal white color, which makes no sense on dark terminals and is literally invisible on light backgrounds.
This overrides Survey to output a gray color for 256-color terminals and default for basic terminals.