Socket
Socket
Sign inDemoInstall

gitlab-tool

Package Overview
Dependencies
5
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gitlab-tool

A thin wrapper of Gitlab API


Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Install size
515 kB
Created
Weekly downloads
 

Readme

Source

Gitlab-Tool

A (really) thin Gitlab API wrapper for node.js

Installation

npm install --save 'gitlab-tool'

Usage

const gitlab = require('gitlab-tool')({
  baseUri: 'http://gitlab.example.com/api/v3',  // Gitlab API uri
  privateToken: 'MY_PRIVATE_TOKEN',  // Profile Settings -> Account -> Private Token
  debug: false           // need some debug log?
})

const PROJECT_ID = 42  // list all projects: https://docs.gitlab.com/ee/api/projects.html#list-all-projects
const ASSIGNEE_ID = 93  // list all users: https://docs.gitlab.com/ee/api/users.html#list-users

// Create a merge request using official API:
// https://docs.gitlab.com/ee/api/merge_requests.html#create-mr
gitlab.post(`/projects/${PROJECT_ID}/merge_requests`, {
    source_branch: 'my-feature',
    target_branch: 'master',
    assignee_id: ASSIGNEE_ID,
    title: 'This is a merge request',
    description: 'some description'
  })
  .then(result => console.log(result))

Documentation

GitLab API

FAQs

Last updated on 24 Jan 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc