Warning, /sdk/git-lab/README.md is written in an unsupported language. File is not indexed.
0001 # Git Lab 0002 0003 Subcommand for git providing a command line interface to GitLab. 0004 An arc-style interface is also provided for a simplified transition from Phabricator to GitLab. 0005 0006 ## Installation 0007 0008 ``` 0009 git clone https://invent.kde.org/sdk/git-lab && cd git-lab 0010 sudo pip3 install -r requirements.txt 0011 sudo ./setup.py install 0012 ``` 0013 0014 ## Workflow 0015 0016 ### Logging in 0017 0018 ``` 0019 git lab login --host invent.kde.org --token ${YOUR_PRIVATE_TOKEN} 0020 ``` 0021 0022 Your token is saved in the json file `~/.config/gitlabconfig` by default. 0023 Alternatively, instead of a token, you can also specify a command (`--command`) that returns the token. 0024 This way, you can store the token in a password manager or gpg-encrypted. 0025 0026 ### Creating a merge request 0027 0028 ``` 0029 git checkout -b feature 0030 ``` 0031 0032 Do your changes 0033 0034 ``` 0035 git commit -m "Commit message" 0036 git lab mr 0037 ``` 0038 0039 ### Listing merge requests 0040 0041 * Merge requests for the current repository 0042 0043 ``` 0044 git lab mrs --project 0045 ``` 0046 0047 * Merge requests for the current GitLab instance (detected from the repository) 0048 ``` 0049 git lab mrs 0050 ``` 0051 0052 * To only show merge requests in specific states, any combination of `--merged`, `--opened` and `--closed` can be added 0053 0054 ### Testing a merge request 0055 0056 ``` 0057 git lab checkout ${NUMBER} 0058 ``` 0059 0060 ### Searching for a project 0061 0062 ``` 0063 git lab search ${NAME} 0064 ``` 0065 0066 ### Creating a snippet 0067 0068 ``` 0069 git lab snippet ${FILENAME} 0070 ``` 0071 0072 or 0073 0074 ``` 0075 echo "Paste data" | git lab snippet 0076 ``` 0077 0078 ## Contributing 0079 0080 ### Run tests 0081 ``` 0082 pytest 0083 ``` 0084 0085 ### Run linter 0086 ``` 0087 ./scripts/lint.sh 0088 ```