How to use the gitlab.ProjectsBundle 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 kube-HPC / hkube / core / api-server / lib / service / githooks / git-service.js View on Github external
async getGitlabLastCommit({ url, branchName = 'master', token = null }) {
        const { host, owner, repo } = this._parseGithubUrlRepo(url);

        const services = new ProjectsBundle({
            host,
            token
        });

        const lastCommit = await services.Commits.all(`${owner}/${repo}`, {
            perPage: 1,
            maxPages: 1,
            showPagination: true,
            ref_name: branchName
        });
        return lastCommit.data[0];
    }

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