npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gitlab-ci-client

v0.0.1

Published

GitLab CI API client

Downloads

5

Readme

gitlab-ci-client

Easy access to GitLab CI for node

Install

$ npm install --save gitlab-ci-client

Tests

$ npm test

Coverage

$ npm run cover

Usage

var gitlab = require('gitlab-ci-client')({
  apiUrl: 'https://ci.gitlab.com'
, token: '<your token>'
, gitlabUrl: 'https://gitlab.com'
, strictSSL: true
, runnerToken: '<your runner token>'
})

API

Projects

var projects = gitlab.projects

Projects.list()

List all projects, all owned projects, or a single project with the given id

Params

| Name | Type | Desc | | ---- | ---- | ---- | | id | String, Number | owned or project id (optional) | | cb | Function | function(err, projects, res) |

Projects.create()

Create a new project with the given data

Params

| Name | Type | Desc | | ---- | ---- | ---- | | data | Object | The params to create | | cb | Function | function(err, body) |

Where data requires:

  • name The project name
  • gitlab_id The GitLab Project ID
  • gitlab_url The web url of the project on GitLab
  • ssh_url_to_repo The ssh url of the project on GitLab

And can also have:

  • scripts (Array or string)
  • default_ref (Defaults to master)

Projects.update()

Updates the project with the given id

Params

| Name | Type | Desc | | ---- | ---- | ---- | | id | String, Number | The project id | | data | Object | The params to create | | cb | Function | function(err, body) |

Where data requires:

  • name The project name
  • gitlab_id The GitLab Project ID
  • gitlab_url The web url of the project on GitLab
  • ssh_url_to_repo The ssh url of the project on GitLab

And can also have:

  • scripts (Array or string)
  • default_ref (Defaults to master)

Projects.del()

Deletes the project with the given id

Params

| Name | Type | Desc | | ---- | ---- | ---- | | id | String, Number | The project id | | cb | Function | function(err, body) |

Projects.link()

Adds a runner to the given project id

Params

| Name | Type | Desc | | ---- | ---- | ---- | | id | String, Number | The project id | | runnerId | String, Number | The runner id | | cb | Function | function(err, body) |

Projects.unlink()

Remove a runner from the given project id

Params

| Name | Type | Desc | | ---- | ---- | ---- | | id | String, Number | The project id | | runnerId | String, Number | The runner id | | cb | Function | function(err, body) |

Runners

var runners = gitlab.runners

Runners.list()

List all of the registered runners

Params

| Name | Type | Desc | | ---- | ---- | ---- | | cb | Function | function(err, body) |

Runners.register()

Registers the runner with the given data

Params

| Name | Type | Desc | | ---- | ---- | ---- | | data | Object | The runner info | | cb | Function | function(err, body) |

Builds

var builds = gitlab.builds

Builds.run()

Tells the coordinator to run this next build

Params

| Name | Type | Desc | | ---- | ---- | ---- | | token | String | The runner token | | cb | Function | function(err, body) |

Builds.update()

Updates the coordinator with the info for the given build id

Params

| Name | Type | Desc | | ---- | ---- | ---- | | id | Number | The build id | | token | String | The runner token | | data | Object | The build info | | cb | Function | function(err, body) |

Where data can have:

  • state (String)
  • trace (String)

Author

Evan Lucas

License

MIT