gitlab

command
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

README

Gitlab Pond

Metrics

Metric Name Description
Pull Request Count Number of Pull/Merge Requests
Pull Request Pass Rate Ratio of Pull/Merge Review requests to merged
Pull Request Reviewer Count Number of Pull/Merge Reviewers
Pull Request Review Time Time from Pull/Merge created time until merged
Commit Author Count Number of Contributors
Commit Count Number of Commits
Added Lines Accumulated Number of New Lines
Deleted Lines Accumulated Number of Removed Lines
Pull Request Review Rounds Number of cycles of commits followed by comments/final merge

Configuration

In your .env file, you will need to set up

```
# Gitlab
GITLAB_ENDPOINT=https://gitlab.com/api/v4/
GITLAB_AUTH=<your access token>
```

You can get your access token from https://gitlab.com/-/profile/personal_access_tokens

For more information on the GITLAB_ENDPOINT see Gitlab docs

Gathering Data with Gitlab

To collect data, you can make a POST request to /task

```
curl --location --request POST 'localhost:8080/task' \
--header 'Content-Type: application/json' \
--data-raw '[[{
    "plugin": "gitlab",
    "options": {
        "projectId": <Your gitlab project id>
    }
}]]'
```

Finding Project Id

To get the project id for a specific Gitlab repository:

  • Visit the repository page on gitlab

  • Find the project id just below the title

    Screen Shot 2021-08-06 at 4 32 53 PM

Use this project id in your requests, to collect data from this project

⚠️ (WIP) Create a Gitlab API Token

  1. When logged into Gitlab visit https://gitlab.com/-/profile/personal_access_tokens

  2. Give the token any name, no expiration date and all scopes (excluding write access)

    Screen Shot 2021-08-06 at 4 44 01 PM

  3. Click the Create Personal Access Token button

  • Copy and save the API token string into lake via new go setup

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL