chore: add debug environment variable to Makefile
See merge request https://gitlab.com/gitlab-org/cli/-/merge_requests/1197
Merged-by: Jay McCure <jmccure@gitlab.com>
Approved-by: Jay McCure <jmccure@gitlab.com>
Approved-by: James Liu <jliu@gitlab.com>
Reviewed-by: Jay McCure <jmccure@gitlab.com>
Co-authored-by: Jaime Martinez <jmartinez@gitlab.com>
fix (docs): Correct HTML comment syntax
Closes#1075
See merge request https://gitlab.com/gitlab-org/cli/-/merge_requests/1056
Merged-by: Gary Holtz <gholtz@gitlab.com>
Approved-by: Gary Holtz <gholtz@gitlab.com>
Co-authored-by: Kai Armstrong <karmstrong@gitlab.com>
Currently the check-update command which checks for
latest glab releases, checks from the releases page
of the old GitHub repo.
This MR changes this behaviour to check releases
from the new gitlab-org/cli repo.
* 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 allows overriding the default protocol of the hostname if a fully qualified url is provided when using the `GITLAB_HOST` environment variable.
For example, if the GITLAB_HOST=http://my.glinstance.org, then the host will be set to my.glinstance.org and the protocol become http, unlike before when the protocol was ignored and only the hostname was considered.
This is a follow-up for #678
and #667
When trying to override host with full URLs, config key lookups would
fail. This came down to the fact that we use `my.gitlab.com` as config
key and when providing override as `https://my.gitlab.com/` it would
fail to find this config key.
Issue #592
When using flags/commands that override the repo, but don't supply
hostname, we allways fallback to `gitlab.com`. This is a problem for
commands like `mr checkout 12 -R OWNER/REPO` that should use API host
`self-hosted`, but actually use `gitlab.com`.
Now we override default host, from the base repo, if one is found.
Environment values still override repo host.
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.