ballerinax/gitlab Ballerina library

1.5.1

Overview

This is a generated connector for GitLab GitLab REST API v4 OpenAPI specification.

Client endpoint for GitLab API currently supports operations related to access requests and access tokens in GitLab.

Prerequisites

  • Create a GitLab account
  • Obtain tokens
    • Use this guide to obtain the PAT tokens related to your account

Quickstart

To use the GitLab connector in your Ballerina application, update the .bal file as follows:

Step 1 - Import connector

First, import the ballerinax/gitlab module into the Ballerina project.

Copy
import ballerinax/gitlab;

Step 2 - Create a new connector instance

You can now make the connection configuration using the PAT token

Copy
gitlab:ApiKeysConfig apiKeyConfig = {
    "privateToken": <GITLAB_PAT_TOKEN>
};

gitlab:Client baseClient = check new Client(apiKeyConfig);

Step 3 - Invoke connector operation

  1. Get Version Information
Copy
public function main() {
    gitlab:VersionResponse|error gitVersion = baseClient->getVersion();
    if (gitVersion is gitlab:VersionResponse) {
        log:printInfo("Git version " + gitVersion?.'version.toString());
    }
}
  1. Use bal run command to compile and run the Ballerina program

Import

import ballerinax/gitlab;Copy

Metadata

Released date: 12 months ago

Version: 1.5.1

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.4.1

GraalVM compatible: Yes


Pull count

Total: 1

Current verison: 1


Weekly downloads


Source repository


Keywords

IT Operations/Source Control

Cost/Freemium


Contributors

Other versions

See more...