https://github.com/nukopy/go-gitlab-api-usage
https://github.com/nukopy/go-gitlab-api-usage
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nukopy/go-gitlab-api-usage
- Owner: nukopy
- Created: 2022-04-15T02:40:49.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-17T12:39:42.000Z (about 4 years ago)
- Last Synced: 2026-01-12T22:42:40.302Z (5 months ago)
- Language: Go
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitLab API Usage
Go で GitLab API を叩く。サンプルとして、特定のグループの全てのプロジェクトを取得して CSV ファイルに吐き出すやつを書いてみた。
## 環境
- OS: macOS 11.6
- CPU: Intel(R) Core(TM) i9-9880H CPU 2.30GHz
- Go 1.18
## 実行方法
1. GitLab のプロフィールページにて Personal Access Token を発行
2. `.env` の作成
3. 実行
### 1. GitLab のプロフィールページにて Personal Access Token を発行
下記を参照。
- [GitLab Docs: Create a personal access tokens](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#create-a-personal-access-token)
### 2. `.env` の作成
- `.env`
```sh
GITLAB_TOKEN="*****"
GITLAB_GROUP_ID="*****"
```
### 3. 実行
```sh
cd go-gitlab-api-usage/
go run .
```