gitlab-x
Advanced tools
Comparing version 0.1.8 to 0.1.9
11
index.js
@@ -16,3 +16,3 @@ #!/usr/bin/env node | ||
const version = "0.1.8"; | ||
const version = "0.1.9"; | ||
@@ -67,2 +67,5 @@ const parser = new ArgumentParser({ | ||
switch(action) { | ||
case "version": | ||
await doVersion(args); | ||
break; | ||
case "get": | ||
@@ -98,2 +101,8 @@ await doGetAction(args); | ||
async function doVersion(args) { | ||
const api = getApiDriver(args); | ||
const version = await api.getVersion(); | ||
const result = filterFields(args, version, args.parameters); | ||
console.dir(result); | ||
} | ||
@@ -100,0 +109,0 @@ async function getProject(args, objectIdentifier, fields) { |
{ | ||
"name": "gitlab-x", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "GitLab Executor API Interface", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/mxcd/gitlab-api", |
## gitlab-x | ||
__GitLab Executor__ | ||
### Prequesities | ||
To use this tool, it is required to have a GitLab account somewhere. In the GitLab, a personal access token needs to be created. The respective page can be found under `https://<gitlab.domain.com>/profile/personal_access_tokens`. Enter a name for your new access token and check the `api` box. If only read-only access is desired, `read_api` is sufficient. Keep the access token safe as it will only be displayed once. | ||
### Usage | ||
In order to provide the access token and base url of the GitLab to `gitlab-x` either use environment variables or pass them as command line options: | ||
#### Environment variables: | ||
`GITLAB_AT` can be used to provide the access token | ||
`GITLAB_URL` can be used to provide the base url of the GitLab | ||
``` | ||
export GITLAB_AT=asdf1234 | ||
export GITLAB_URL=https://gitlab.com | ||
``` | ||
#### Command line: | ||
If no environment varialbe is given for the access token or base url, they need to be provided as command line arguments: | ||
`-u` or `--url` followed by the GitLab URL | ||
`-t` or `--access-token` followed by the access token | ||
``` | ||
npm gitlab-x -u gitlab.com -t asdf1234 version |
13701
324
21