GitLab CLI 库
Migrate to mdsb100/node-gitlab#cli for using [email protected] and gitlab-API@v4.
I create a pull-request to jdalrymple/node-gitlab, but so far jdalrymple/node-gitlab has not accepted it.
For now, you can use it locally by npm link
git clone [email protected]:mdsb100/node-gitlab.git
cd node-gitlab && npm install
npm run build
npm link
gitlab -h
gitlab url http://gitlab.xxx.net/
gitlab token xxxxxxxxxxxxx
gitlab-users whoamiThe following is the old document
You need to be very careful to set 'gitlab url'.
Please make sure your settings are 'http' or 'https'.
# Install from npm for global
npm install cli-gitlab -g
# You will see all command
gitlab --help
# For example
gitlab url "http://example.com"
gitlab token "abcdefghij123456"
gitlab me
{
"avatar_url": "http://gitlab.baidao.com//uploads/user/avatar/9/764b89699bcc946e4239b04f28002ce9.jpeg",
"bio": "",
"can_create_group": true,
"can_create_project": true,
"color_scheme_id": 1,
"created_at": "2014-08-06T03:30:19.417Z",
"email": "[email protected]",
"extern_uid": null,
"id": 9,
......
}
gitlab map test.jsontest.json:
{
"t": {
"filter": true,
"size": true,
"param": [""],
"desc": "Search user by email or username.",
"nameSpaces": "users.search"
}
}gitlab t --help
Usage: t [options]
Search user by email or username.
Options:
-h, --help output usage information
--size (optional) - Output size of result.
--filter (optional) - Filter result. For example: --filter 'item.assignee.id == 9'Check map rule
'nameSpaces' please check node-gitlab
For example:
# In Projects.coffee
# class Projects extends BaseModel ==> projects
# @members = @load 'ProjectMembers' ===> memebers
# In ProjectMembers
# update: (projectId, userId, accessLevel = 30, fn = null) => ===> update
# so nameSpaces is 'projects.memebers.update'By the way, the 'extend' function is used by undersore.extend.
……gitlab issues --assigned_to_me --created_by_me --state opened --size…Refernce issues
…………MIT
暂无开放 Issues,或尚未同步最近议题。