https://github.com/denchenko/gg
Custom git(lab) CLI
https://github.com/denchenko/gg
cli git gitlab hook roulette
Last synced: 3 months ago
JSON representation
Custom git(lab) CLI
- Host: GitHub
- URL: https://github.com/denchenko/gg
- Owner: denchenko
- License: mit
- Created: 2025-12-07T07:14:24.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-12-30T17:13:27.000Z (6 months ago)
- Last Synced: 2026-01-03T02:55:23.462Z (6 months ago)
- Topics: cli, git, gitlab, hook, roulette
- Language: Go
- Homepage:
- Size: 86.9 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gg
[](https://goreportcard.com/report/github.com/denchenko/gg)
[](https://godoc.org/github.com/denchenko/gg)
A CLI tool for managing GitLab merge requests with intelligent workload analysis and automatic assignment suggestions.
```
∙ gg my mr
Fetching your merge requests... [done]
4 total, 1 ready-to-merge, 2 stalled
┌─ denchenko/example-repository-1 ──────────────────────────────────────────────────┐
│
│ ISSUE-1 | mvp
│ URL: https://gitlab.com/denchenko/example-repository-1/-/merge_requests/65
│ Assignee: bob
│ Reviewers: None
│ Approvals: None
│ Created: 2025-12-04 12:36:17
│ Updated: 2025-12-05 15:02:32
│
│ [ready-to-merge] ISSUE-2 | fixes
│ URL: https://gitlab.com/denchenko/example-repository-1/-/merge_requests/66
│ Assignee: alice
│ Reviewers: None
│ Approvals: alice
│ Created: 2025-12-05 10:52:28
│ Updated: 2025-12-05 10:52:32
│
│ [stalled] ISSUE-3 | test
│ URL: https://gitlab.com/denchenko/example-repository-1/-/merge_requests/67
│ Assignee: alice
│ Reviewers: None
│ Approvals: None
│ Created: 2025-11-13 14:40:04
│ Updated: 2025-11-14 09:23:22
│
└───────────────────────────────────────────────────────────────────────────────────┘
┌─ denchenko/example-repository-2 ──────────────────────────────────────────────────┐
│
│ [stalled] Draft: ISSUE-4 | new feature
│ URL: https://gitlab.com/denchenko/example-repository-2/-/merge_requests/68
│ Assignee: bob
│ Reviewers: None
│ Approvals: None
│ Created: 2025-08-26 15:31:28
│ Updated: 2025-08-27 16:31:52
│
└───────────────────────────────────────────────────────────────────────────────────┘
```
## Configuration
Environment:
- `GG_TOKEN` (required) - Your GitLab personal access token with `api` scope
- `GG_TEAM` (required) - Comma-separated list of team member usernames (e.g., `user1,user2,user3`)
- `GG_BASE_URL` (optional) - GitLab instance URL (defaults to `https://gitlab.com`)
- `GG_WEBHOOK_ADDRESS` (optional) - Web Hook listen address (defaults to `:8080`)
- `GG_ISSUE_URL_TEMPLATE` (optional) - Template for generating issue URLs. Must contain `{{.Issue}}` placeholder (e.g., `https://jira.com/browse/{{.Issue}}`)
The current project, branch, and merge request can be infered from the Git repository you run it in, so most commands work without manually passing these identifiers.
## Usage
### CLI
**Install:**
```bash
go install github.com/denchenko/gg/cmd/gg@latest
```
The CLI provides commands for managing merge requests and analyzing team workload:
- `gg my mr` - Show your personal merge requests with status information
- `gg my review` - Display your review workload (MRs assigned to you or requiring your review)
- `gg my activity` - Show your activity events (pushes, comments, MR actions, etc.). Defaults to events from the last working day
- `gg team review` - Show team-wide workload overview with active MR counts per member
- `gg mr roulette` - Analyze team workload and suggest optimal assignee and reviewer for a merge request
- `gg mr status` - Show detailed status information for a merge request
- `gg mr browse` - Open the merge request for the current git branch in your default browser
- `gg issue browse` - Open the issue linked to the current branch's merge request in your default browser
### Webhook Server
**Install:**
```bash
go install github.com/denchenko/gg/cmd/hook@latest
```
The webhook server automatically assigns assignees and reviewers to merge requests when they are opened (excluding draft MRs and those already assigned).
The server will start on port `8080` by default and listen for webhooks at `/gitlab/hook`.
**GitLab Webhook Configuration:**
1. Go to your GitLab project → Settings → Webhooks
2. Add a new webhook with URL: `http://your-server:8080/gitlab/hook`
3. Select "Merge request events" trigger
4. Save the webhook