Commit Graph

15 Commits

Author SHA1 Message Date
Kai Armstrong 39e9e21313 chore: re-add linting/formatting job to ci 2022-11-17 18:36:09 +00:00
Andreas Gruhler 9989ec1207 feat: Show Full Path on Issue and MR List (#1056) 2022-10-06 19:54:26 +00:00
Oscar Tovar 40a5436789 chore: update module path 2022-09-19 20:23:45 +00:00
Clement Sam 40c8f6760e fix(check-update): check latest release from GitLab
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.
2022-08-10 18:58:23 +00:00
Calle Pettersson 44287f0f03
feat(mr): Only output MR URL to stdout if output is not a TTY (#883)
* feat(mr): Only output MR URL to stdout if output is not a TTY

This enables "glab mr create -f -y | some command" to only pass the url
through the pipe.

* feat(issue): Output only issue URL to stdout if output is not a TTY
2021-11-18 14:47:03 +00:00
Rob Hoelz 2eba4de79a
Add support for terminal hyperlinks (#852)
* 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
2021-10-27 09:41:35 +00:00
Clement Sam 0272873eb8 fix list tests 2021-05-12 00:44:40 +00:00
Clement Sam d52c01a482 refactor: move pkg/api package to /api 2021-01-29 08:43:18 +00:00
Clement Sam a8ac704ccd refactor: move internal/utils package to pkg/utils 2021-01-29 08:40:52 +00:00
Clement Sam b72427d268 switch entirely to ColorPalette 2021-01-29 00:56:45 +00:00
Clement Sam e4acafd006 refactor: move iostreams to own separate package
- Move iostreams to own separate package
- Fix references to iostream package
- Add StartSpinner and StopSpinner methods
2021-01-28 22:38:32 +00:00
Clement Sam 642901ac28 fix bug risks 2021-01-09 02:09:40 +00:00
Clement Sam e078a3c11c feat(command/issueutils/utils): add helper functions to parse issue args 2021-01-09 01:45:49 +00:00
Clement Sam cab05b6264
style: enhance list table display (#261)
* style: enhance list table display

* fix lint error

* enhance list display

* increase list limit to 30

* fix lint errors

* fix ci failure
2020-10-12 05:26:59 +00:00
Clement Sam 6c4fe1c2e8
Isolate commands into separate sub-packages (#229)
* refactor: organize commands into separate subfolders

* Format code with gofmt

This commit fixes the style issues introduced in d1f70d5 according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/1ce57d1c-4f1e-48c2-a4d8-00c1bce7fb49/

* 🔥 sub-packaging

* Format code with gofmt

This commit fixes the style issues introduced in ca0bff4 according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/11379011-98c6-43ea-8baa-4fefa9b775e4/

* 🔥 sub-packaging

* Format code with gofmt

This commit fixes the style issues introduced in 00e5936 according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/c912f945-acf3-48d2-a550-0895c0153df0/

* Done with sub-packaging 🔥

* 🔥 tests

* Format code with gofmt

This commit fixes the style issues introduced in 56a8ff4 according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/24498865-4980-479f-90c7-7ddd228c2bb4/

* fix bug risks

* fix tests

* fix tests

* Format code with gofmt

This commit fixes the style issues introduced in c947d02 according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/cb2ac46a-f857-40d5-8508-eacc253b3614/

* Format code with gofmt

This commit fixes the style issues introduced in 902ff7b according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/f60ba0d6-94d3-47c0-ae27-568a5cc5d9e5/

* fix tests

* fix tests

* 🔥 gookit/color

* Format code with gofmt

This commit fixes the style issues introduced in 5a129ea according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/8f1c8327-f5c6-4ff5-97d2-3c8a23f0a1e2/

* Autofix issues in 1 files

Resolved issues in the following files via DeepSource Autofix:
1. commands/cmdtest/helper.go

* add tests for MR

* Format code with gofmt

This commit fixes the style issues introduced in 758af28 according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/d55a4867-aa23-4202-b2cc-a7ceafbaa53e/

* migrate old config to new config

* fix bug risks

* Format code with gofmt

This commit fixes the style issues introduced in 0ea8eb2 according to the output
from gofmt.

Details: https://deepsource.io/gh/profclems/glab/transform/f90cf664-8396-4b78-814d-3167ce898164/

* refactoring

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2020-09-29 05:55:34 +00:00