Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gitlab-commando

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitlab-commando

A TypeScript library implementing command pattern with undo/redo functionality for interacting with the GitLab API.

  • 0.2.1
  • unpublished
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

GitLab Commando

gitlab-commando is a TypeScript library that implements the command pattern with undo/redo functionality specifically for interacting with the GitLab API. This library provides a robust and flexible way to perform various GitLab operations programmatically while supporting undoable actions for safer batch operations.

Installation

npm i gitlab-commando

Usage

Here is how you can use the gitlab-commando to interact with the GitLab API:

import { GitLabSession } from 'gitlab-commando';

const gitlabSession = new GitLabSession('your-instance-url');

// Create a new project
gitlabSession.createProject('your-token', 'New Project', 'namespaceId', ['topic1', 'topic2'], 'master').then(response => {
  console.log('Project created:', response);
}).catch(error => {
  console.error('Error creating project:', error);
});

// Close a merge request
gitlabSession.closeMergeRequest('your-token', 'project-id', 'merge-request-iid').then(response => {
  console.log('Merge request closed:', response);
}).catch(error => {
  console.error('Error closing merge request:', error);
});

// Undo the commands above
gitlabSession.rollback();

Keywords

FAQs

Package last updated on 23 May 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc