README.md 4.1 KB
Newer Older
F
Fatih Acet 已提交
1
# [GitLab VSCode Extension](https://gitlab.com/fatihacet/gitlab-vscode-extension)
F
Fatih Acet 已提交
2

F
Fatih Acet 已提交
3 4
[![Marketplace Version](https://vsmarketplacebadge.apphb.com/version/fatihacet.gitlab-workflow.svg)](https://marketplace.visualstudio.com/items?itemName=fatihacet.gitlab-workflow) [![Installs](https://vsmarketplacebadge.apphb.com/installs/fatihacet.gitlab-workflow.svg)](https://marketplace.visualstudio.com/items?itemName=fatihacet.gitlab-workflow)

F
Fatih Acet 已提交
5
This extension adds GitLab specific options to VSCode command pallette and status bar like showing pipeline status or opening active file on GitLab and much more.
F
Fatih Acet 已提交
6

F
Fatih Acet 已提交
7
### Features
F
Fatih Acet 已提交
8

9
- Shows pipeline status for current branch on VSCode status bar and click it to open pipeline on GitLab.
10
- Shows MR id of your current branch on VSCode status bar and click it to view on GitLab.
F
Fatih Acet 已提交
11 12 13 14 15
- Advanced pipeline actions menu
  - View latest pipeline on GitLab.com
  - Create a new pipeline for your current branch
  - Retry last pipeline
  - Cancel last pipeline
F
Fatih Acet 已提交
16 17 18 19
- View current file on GitLab, including active line number and range selection.
- View MR of current branch on GitLab.
- View issues assigned to you on GitLab.
- View MRs assigned to you on GitLab.
20
- View current pipeline on GitLab.
F
Fatih Acet 已提交
21 22 23 24 25
- View current project on GitLab.
- Open new issue page for your current project.
- Open new MR page for your current project.
- Ability to add and remove your GitLab Personal Access Token.

26 27
**Curious to know what's next?** [See here](#whats-next)

F
Fatih Acet 已提交
28

F
Fatih Acet 已提交
29
### Setup
F
Fatih Acet 已提交
30

F
Fatih Acet 已提交
31
To use this extension, you need to create a GitLab Personal Access Token and give it to the extension.
F
Fatih Acet 已提交
32

F
Fatih Acet 已提交
33 34 35 36 37 38 39 40 41
##### Step 1: Create your Personal Access Token
- Go to "Settings" page on GitLab.com or your self hosted GitLab instance.
- On the left navigation menu, click "Access Tokens".
- On "Add a personal access token" form
  - Give a name to your token.
  - Select and expiry date.
  - Select "api" and "read_user" permissions.
  - Hit "Create personal access token" button.
- Copy the token. _Remember you won't be able to see value of this token ever again for security reasons._
F
Fatih Acet 已提交
42

F
Fatih Acet 已提交
43 44 45 46
##### Step 2: Add token to GitLab Workflow Extension
- Open up Command Palette by pressing `Cmd+Shift+P`.
- Search for "GitLab: Set GitLab Personal Access Token" and hit Enter.
- Extension will ask your PAT. Paste your PAT and hit Enter. _It won't be visible and accessible to others._
F
Fatih Acet 已提交
47

F
Fatih Acet 已提交
48
That's it. 🏁
F
Fatih Acet 已提交
49

F
Fatih Acet 已提交
50
You can start using this extension right away. If your project has a pipeline for last commit and a MR from your current branch, you should see them on VSCode status bar. 🎉
F
Fatih Acet 已提交
51

52

F
Fatih Acet 已提交
53
### Usage
F
Fatih Acet 已提交
54 55
- Open up Command Palette by pressing `Cmd+Shift+P`.
- Search for GitLab
F
Fatih Acet 已提交
56 57

![https://gitlab.com/fatihacet/gitlab-vscode-extension/raw/master/src/assets/gitlab-vscode.png](https://gitlab.com/fatihacet/gitlab-vscode-extension/raw/master/src/assets/gitlab-vscode.png)
F
Fatih Acet 已提交
58

F
Fatih Acet 已提交
59 60
![https://gitlab.com/fatihacet/gitlab-vscode-extension/raw/master/src/assets/pipeline-actions.png](https://gitlab.com/fatihacet/gitlab-vscode-extension/raw/master/src/assets/pipeline-actions.png)

F
Fatih Acet 已提交
61 62 63 64 65 66 67 68 69

### Configuration options

##### `gitlab.instanceUrl` (required: false, default: 'https://gitlab.com')
If you are using GitLab on a custom domain, you should add this to your user settings file. Example: `"gitlab.instanceUrl": "https://my-gitlab-domain.com"`

> You can open User Settings file by pressing `Cmd+,` on Mac OS or following `Code > Preferences > User Settings`. You can simply add extension configuration values to you User Settings file. This won't break or change anything on your VSCode.


70
### What's next?
F
Fatih Acet 已提交
71 72 73
- `[Shipped in 0.2.2]` Pipeline link to pipeline status bar item.
- `[Shipped in 0.2.2]` View last pipeline on GitLab.
- `[Shipped in 0.3.0]` Pipeline actions menu to quickly view, retry, cancel or create a new pipeline.
74 75 76 77 78 79
- Issue and MR search
- Detailed issue and MR search
  - `title:MR discussions refactor label:frontend label:discussions assignee:fatihacet`
- Compare your changes with master on GitLab


F
Fatih Acet 已提交
80 81
### Contribution
This extension is open source and [hosted on GitLab](https://gitlab.com/fatihacet/gitlab-vscode-extension). Contributions are more than welcome. Feel free to fork and add new features or submit bug reports.