Commit Graph

17 Commits

Author SHA1 Message Date
Kai Armstrong 39e9e21313 chore: re-add linting/formatting job to ci 2022-11-17 18:36:09 +00:00
Oscar Tovar 40a5436789 chore: update module path 2022-09-19 20:23:45 +00:00
Rob Hoelz fe0056a38e fix(ci trace): exit normally when prompts are interrupted
…specifically, interrupted via SIGINT (CTRL-C).  Otherwise,
the first job is chosen, which isn't a huge deal, but isn't really
consistent with the user's wish to exit the program early
2021-10-01 14:12:35 -05:00
Callum Loh 399b13fbcf Respect job ID when passing it to the trace command
Signed-off-by: Callum Loh <callumloh@gmail.com>
2021-06-14 18:17:10 +01:00
Paulo Oliveira 2f49658c43 feat(ci/status): list of external jobs and fix when no jobs are found for the pipeline 2021-06-06 01:49:19 +01:00
Ramon Rüttimann 2f2dfc9b80 fix job viewing with detached pipelines
For `ci trace` and `ci status`, the `GetPipelines` function has been
used. However, `GetPipelines` does not with [detached pipelines](https://docs.gitlab.com/ee/ci/merge_request_pipelines/).

To fix this, we're now using a new function `GetLastPipeline`, which
first tries to get the last pipeline through the `GetCommit` API and if
that should not return any results, it falls back to the old
`GetPipelines` function.

Some parts of the codes have been refactored to use this new function
instead of listing all pipelines and then grabbing the first elementt of
that list.

`GetPipelines` is now only used within the `api` package itself, but I
kept it public for compatibility reasons.
2021-05-16 20:47:39 +02:00
Clement Sam 42930fd55f move /internal/git to /pkg/git 2021-01-29 10:15:59 +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 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
Alberts Zemzale 835c39f499 chore(ci trace): Remove unused dependency to ciViewCmd 2021-01-07 09:40:34 +02:00
Clement Sam a6f5c901f3 fix: respect repo override
The repo override was not respected by the following commands
- `issue create`
- `mr create`
- `ci trace`

This was due the the BaseRepo and HTTPClient being assigned too early
before the PersistentPrerun function is executed

Resolves #455
2020-12-30 21:17:25 +00:00
Leo 6732be6166 refactor(commands/ci): pass context.Context as first argument
From: https://golang.org/pkg/context/

Do not store Contexts inside a struct type; instead, pass a
Context explicitly to each function that needs it. The Context
should be the first parameter, typically named ctx

https://deepsource.io/gh/profclems/glab/run/0801fe82-1e9c-42fd-acc7-affe7f2e2fbb/go/RVV-A0002/
2020-12-28 07:29:55 -03:00
Clement Sam 1b6100c6b8 lint 2020-12-21 18:22:49 +00:00
Clement Sam f6ecee7e93 test: fix ci trace test 2020-12-21 18:19:27 +00:00
Clement Sam 0b5ceb9012 fix examples 2020-12-21 12:21:59 +00:00
Clement Sam 787c954e89 feat: move pipeline ci command to ci 2020-12-21 11:45:28 +00:00
Renamed from commands/pipeline/ci/trace/pipeline_ci_trace.go (Browse further)