A simple tool that calls gitlab api to generate the repo summary
Project description
gitlab-api-helper
This is a tool that calls the Gitlab API. It can query the list of projects, list branches of a specific project, and, after specifying the project and branch name, display the commit log.
Installation
% pip install gitlab-api-helper
Gitlab Setup
Prepare the AccessToken
Add a personal access token
https://gitlab.example.com/-/profile/personal_access_tokens
- read_api
- read_user
- read_repository
Invite members
- Select a role
- Reporter
Usage
% gitlab-api-helper --api https://gitlab.example.com/
{
"info": [
"config file not found: .env"
],
"result": {
"data": [],
"error": 0,
"errorMessage": null,
"status": true
},
"version": "1.0.0"
}
Projects
% gitlab-api-helper --api https://gitlab.example.com --apiAccessToken 'glpat-XXXXXXXXXXXXX'
{
"info": [
"config file not found: .env"
],
"result": {
"data": [
{
"created_at": "2023-10-03T00:00:00.000+08:00",
"http_url_to_repo": "https://gitlab.example.com/web/test.git",
"id": 179,
"name": "test",
"name_with_namespace": "web / test",
"path": "test",
"path_with_namespace": "web/test",
"ssh_url_to_repo": "git@gitlab.example.com:web/test.git",
"web_url": "https://gitlab.example.com/web/test"
},
...
],
"error": 0,
"errorMessage": null,
"status": true
},
"version": "1.0.0"
}
Branches
% gitlab-api-helper --api https://gitlab.example.com --apiAccessToken 'glpat-XXXXXXXXX' --lookup branch --lookupProjectID 1
{
"info": [
"config file not found: .env"
],
"result": {
"data": [
{
"name": "alpha",
"web_url": "https://gitlab.example.com/web/test/-/tree/alpha"
},
{
"name": "develop",
"web_url": "https://gitlab.example.com/web/test/-/tree/develop"
},
{
"name": "main",
"web_url": "https://gitlab.example.com/web/test/-/tree/main"
}
],
"error": 0,
"errorMessage": null,
"status": true
},
"version": "1.0.0"
}
Commits
% gitlab-api-helper --api https://gitlab.example.com --apiAccessToken 'glpat-XXXXXXXXXXXX' --lookup commit --lookupProjectID 1 --lookupBranch develop
{
"info": [
"config file not found: .env",
"sinceISO8601FormatDateValue: 2023-10-03T00:00:00.281140"
],
"result": {
"data": [
{
"author_email": "user@gitlab.example.com",
"author_name": "user",
"committed_date": "2023-10-03T00:10:05.000+08:00",
"committer_email": "user@gitlab.example.com",
"created_at": "2023-10-03T00:10:05.000+08:00",
"id": "xxxxxxxxxxxxxxxxxxxxxx",
"message": "init\n",
"short_id": "xxxxx",
"title": "init"
},
...
],
"error": 0,
"errorMessage": null,
"status": true
},
"version": "1.0.0"
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitlab_api_helper-1.0.1.tar.gz.
File metadata
- Download URL: gitlab_api_helper-1.0.1.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d63475019d1c070defad9ea11512ced824ae673c2166587f10f970feb3421edc
|
|
| MD5 |
bf699bbdbc8d6b5dc9c82883c8973113
|
|
| BLAKE2b-256 |
feb5d7262bf04d7d278e6057558d2ad3d84dbb835ef13f7710d5962cfa7b36a6
|
Provenance
The following attestation bundles were made for gitlab_api_helper-1.0.1.tar.gz:
Publisher:
python-publish.yml on changyy/gitlab-api-helper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gitlab_api_helper-1.0.1.tar.gz -
Subject digest:
d63475019d1c070defad9ea11512ced824ae673c2166587f10f970feb3421edc - Sigstore transparency entry: 229902871
- Sigstore integration time:
-
Permalink:
changyy/gitlab-api-helper@4ae53ae283c1ed89037201f4f67b127b1b4e96ce -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/changyy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4ae53ae283c1ed89037201f4f67b127b1b4e96ce -
Trigger Event:
release
-
Statement type:
File details
Details for the file gitlab_api_helper-1.0.1-py3-none-any.whl.
File metadata
- Download URL: gitlab_api_helper-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e84ac4c1d7a17baaeeaeeab22aca9a24813fb7a2ce5b507663faa589c048bb30
|
|
| MD5 |
ff097de798697293b0c1fc92b4528a43
|
|
| BLAKE2b-256 |
f2b107c343ec6de728ecec2e00dd62baabc29f0a9540445dd462778cfe7f9d0a
|
Provenance
The following attestation bundles were made for gitlab_api_helper-1.0.1-py3-none-any.whl:
Publisher:
python-publish.yml on changyy/gitlab-api-helper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gitlab_api_helper-1.0.1-py3-none-any.whl -
Subject digest:
e84ac4c1d7a17baaeeaeeab22aca9a24813fb7a2ce5b507663faa589c048bb30 - Sigstore transparency entry: 229902877
- Sigstore integration time:
-
Permalink:
changyy/gitlab-api-helper@4ae53ae283c1ed89037201f4f67b127b1b4e96ce -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/changyy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4ae53ae283c1ed89037201f4f67b127b1b4e96ce -
Trigger Event:
release
-
Statement type: