Collector "GitLab" Configuration Manual
1. Configuration Example
1.1 Modify the following configuration in the script file
Python | |
---|---|
1 2 3 4 |
|
1.2 Create a Guance Connector
In the "Manage / Experimental Features" section, enable the "Guance Connector".
Go to "Development / Connectors / Add Connector", select the type as "Guance", and fill in the relevant configuration parameters according to the input box prompts (this script requires the ID value to be "Guance").
For more information on selecting Guance connector nodes, please refer to: Manual / Interface and Operations / Guance Nodes
2. Tutorial for Obtaining a GitLab Personal Access Token:
- Log in to GitLab.
- In the top right corner, select your avatar.
- Select Edit Profile.
- On the left sidebar, select Access Tokens.
- Enter the name of the token and the expiration date.
- The token expires at midnight UTC on this date.
- If you do not enter an expiration date, it will automatically be set to 365 days after the current date.
- By default, this date can be up to 365 days after the current date.
- Set Scopes
- Select Create Personal Access Token
Save the personal access token in a secure place. Once you leave the page, you will no longer be able to access the token!
3. Data Reporting Format
After data is synchronized successfully, you can view the data in the "LOG" section of TrueWatch.
Example of reported data:
Commit data
JSON | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
Issue data
JSON | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
Merge data
JSON | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
Explanation of some fields:
Field | Type | Description |
---|---|---|
group_name |
String | Group Name |
project_name |
String | Project Name |
author_name |
String | Operator Name |
X. Appendix
GitLab Related Documentation
Please refer to the official GitLab documentation:
Guance Documentation
Please refer to the official Guance documentation: