Crates.io | git_lab_cli |
lib.rs | git_lab_cli |
version | 0.17.0 |
source | src |
created_at | 2020-04-13 18:21:21.327069 |
updated_at | 2020-07-27 20:51:23.148711 |
description | A custom git command for interacting with a GitLab server |
homepage | https://gitlab.com/bradwood/git-lab-rust |
repository | https://gitlab.com/bradwood/git-lab-rust |
max_upload_size | |
id | 229772 |
size | 1,502,665 |
This is a cli tool that adds the lab
command to git
to enable interaction with a GitLab server.
See CHANGELOG.md for a summary of fixes and features added to each release.
The tool is designed to work as a custom command to the vanilla git
cli command. Once
installed you can invoke it with git lab <subcommand> <options>...
.
init
-- initialise credentials against a remote GitLab serverproject
-- interact with GitLab projects
project create
-- create projectproject attach
-- associate a local repo with a projectproject (open|view|browse)
-- open project's URL in browserproject (show|info|get)
-- show details about a projectissue
-- interact with issues
issue create
-- create issue (either entirely via cli-passed parameters, or
interactively, by prompting the user for the inputs needed)issue assign
-- assign issueissue (open|view|browse)
-- open issue's URL in browserissue (show|info|get)
-- show details about a issueissue list
-- get list of issuesissue close
-- close issueissue reopen
-- reopen issueissue lock
-- lock discussions on issueissue unlock
-- unlock discussions on issuemr
-- interact with merge requests
mr create
-- create merge request (either entirely via cli-passed parameters, or
interactively, by prompting the user for the inputs needed)mr assign
-- assign merge requestmr close
-- close merge requestmr reopen
-- reopen merge requestmr lock
-- lock discussions on merge requestmr unlock
-- unlock discussions on merge requestmr list
-- get list of merge requestsmr (open|view|browse)
-- open merge request's URL in browsermr (show|info|get)
-- show details about a merge requestmr (checkout|co)
-- checkout merge requestmr wip
-- toggle WIP:
(or Draft:
) status of merge requestmr approve
-- approve merge requestmr merge
-- merge merge requestlabels
-- interact with Gitlab labelsproject list
-- get list of projectspipeline
-- interact with Gitlab CI jobsgroup
-- interact with Gitlab groupsuser
-- interact with Gitlab usersgit config
machineryjq
$EDITOR
integration on create
commandsmusl
binaries available hereIf you have the Rust toolchain installed, you can install via cargo
:
cargo install git_lab_cli
Grab a tarball for these here. Untar the file and then copy the included files into place as shown in the below example:
cd git_lab_cli-x.y.z-x86_64-unknown-linux-musl
sudo cp git-lab /usr/local/bin/
sudo cp man/git-lab.1 /usr/local/share/man/man1/
To connect the git-lab
cli binary to a GitLab instance you need to create a Personal Access
Token. On Gitlab.com this can be done
here. Copy the token to your clipboard and
then run the following from your home directory:
git lab init
This will prompt you though entering the required set-up parameters, one of which will require
you to paste the GitLab token copied in the previous step into the config. Your default
.gitconfig
will then be updated with the information needed to connect git-lab
to your
server. You can also set this config up with vanilla git config
commands. See git lab init --help
for details on how to do this.
The easiest way to get started with an existing git repo is to run the following from within the repo:
git lab project attach
This will assoicate the git repo you are working on with a server-side GitLab project by
looking at your origin
git remote. Once this is done, you'll be able to query, create, and
modify project-specific objects like GitLab issues, merge-requests, and such like as long as
you remain within the repo's subtree.
The tool tries to track GitLab.com's latest version pretty closely. Currently GitLab 13.0 and above work but earlier versions do not.
Merge requests are welcome. Please raise a merge request on GitLab, not GitHub.
License: MIT