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
Use this project id in your requests, to collect data from this project
⚠️ (WIP) Create a Gitlab API Token
-
When logged into Gitlab visit
https://gitlab.com/-/profile/personal_access_tokens
-
Give the token any name, no expiration date and all scopes (excluding write access)
-
Click the Create Personal Access Token button
- Copy and save the API token string into
lake
via new go setup
Documentation ¶
There is no documentation for this package.
Click to show internal directories.
Click to hide internal directories.