…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
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.
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