How to use the gitlab.default function in gitlab

To help you get started, we’ve selected a few gitlab examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github piceaTech / node-gitlab-2-github / index.js View on Github external
) {
  console.log('\n\nYou have to enter your GitLab url in the settings.js file.');
  process.exit(1);
}
if (
  !settings.gitlab.token ||
  settings.gitlab.token === '{{gitlab private token}}'
) {
  console.log(
    '\n\nYou have to enter your GitLab private token in the settings.js file.'
  );
  process.exit(1);
}

// Create a GitLab API object
const gitlabApi = new Gitlab({
  url: settings.gitlab.url,
  token: settings.gitlab.token,
});

// Create a GitHub API object
const githubApi = new GitHubApi({
  debug: false,
  baseUrl: settings.github.baseUrl
    ? settings.github.baseUrl
    : 'https://api.github.com',
  timeout: 5000,
  headers: {
    'user-agent': 'node-gitlab-2-github', // GitHub is happy with a unique user agent
    accept: 'application/vnd.github.v3+json',
  },
});
github extraStatic / stapsher / libs / SCM / GitLab / index.js View on Github external
constructor({ info = {}, config }) {
    this.info = info
    this.config = config

    this.api = new GitLabAPI({
      url: this.config.baseUrl,
      token: this.config.accessToken
    })
  }

gitlab

Full NodeJS implementation of the GitLab API. Supports Promises, Async/Await.

MIT
Latest version published 5 years ago

Package Health Score

65 / 100
Full package analysis