Skip to main content

CLI wrapper around GitLab Discussions REST API for listing, creating, and managing MR discussions

Project description

glab-discussion

CLI wrapper around GitLab Discussions REST API for listing, creating, and managing merge request discussions. Built on top of glab for authentication.

Installation

uv tool install glab-discussion

Claude Code plugin

The repo includes a Claude Code plugin with a skill that teaches AI agents how to use glab-discussion.

claude plugin marketplace add fprochazka/glab-discussion
claude plugin install glab-discussion@fprochazka-glab-discussion

To upgrade after a new release:

uv tool install --force glab-discussion
claude plugin marketplace update fprochazka-glab-discussion
claude plugin update glab-discussion@fprochazka-glab-discussion

Usage

All subcommands accept --mr-url or --hostname/--project/--mr-iid to identify the merge request.

read

Read and display MR discussions.

glab-discussion read --mr-url https://gitlab.com/group/project/-/merge_requests/123
glab-discussion read --dump          # structured data output
glab-discussion read --dump --full   # force full rewrite

write

Create a new discussion or reply to an existing one.

glab-discussion write --body "Comment text" --mr-url ...
glab-discussion write --body "Reply" --reply-to DISCUSSION_ID --mr-url ...
glab-discussion write --body "Diff note" --file path/to/file.py --new-line 42 --mr-url ...
echo "From stdin" | glab-discussion write --body - --mr-url ...

diff

Show MR diff information.

glab-discussion diff --mr-url ...
glab-discussion diff --file path/to/file.py --mr-url ...
glab-discussion diff --version 3 --mr-url ...

resolve

Resolve or unresolve a discussion.

glab-discussion resolve DISCUSSION_ID --mr-url ...
glab-discussion resolve DISCUSSION_ID --unresolve --mr-url ...

Requirements

  • glab CLI installed and authenticated
  • Python 3.12+

Development

git clone https://github.com/fprochazka/glab-discussion.git
cd glab-discussion
uv sync --dev

Run tests and linting:

uv run ruff format .
uv run ruff check .
uv run pytest

Releasing

Version is derived automatically from git tags via hatch-vcs — no manual version bumping needed.

Before tagging, bump the version in both plugin manifest files:

  • coding-agent-plugins/claude-code/.claude-plugin/plugin.json
  • .claude-plugin/marketplace.json

Wait for CI to pass on master, then tag, push, and create a GitHub release:

# Review changes since last release
git log $(git describe --tags --abbrev=0)..HEAD --oneline

git tag v<version>
git push origin v<version>
gh release create v<version> --title "v<version>" --notes "..."

The publish.yml GitHub Action builds and publishes to PyPI automatically via trusted publishing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

glab_discussion-0.1.4.tar.gz (30.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

glab_discussion-0.1.4-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file glab_discussion-0.1.4.tar.gz.

File metadata

  • Download URL: glab_discussion-0.1.4.tar.gz
  • Upload date:
  • Size: 30.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for glab_discussion-0.1.4.tar.gz
Algorithm Hash digest
SHA256 430c54aa4bf054bf9229a8d6821e2c4a3aa0d0c83f555a47f152c81d769756d5
MD5 1047ffc903da0ab67a755f30d0ed7444
BLAKE2b-256 1de9e33aa3f6ade1c98ba954eac490a20a3f8c9bceca8cc7ae33ddebc331096f

See more details on using hashes here.

Provenance

The following attestation bundles were made for glab_discussion-0.1.4.tar.gz:

Publisher: publish.yml on fprochazka/glab-discussion

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file glab_discussion-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for glab_discussion-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d5e81d0eafaaff6f50eb29197b18931f284a14ece63df8aa1d38c26b4389d641
MD5 afbe7d1497b70a838ed357ae0f4137e2
BLAKE2b-256 f63fd0d3cfdf94ed0a73fc8b26df60508de0b4cb482f6f12b5f8e0adc3f6e132

See more details on using hashes here.

Provenance

The following attestation bundles were made for glab_discussion-0.1.4-py3-none-any.whl:

Publisher: publish.yml on fprochazka/glab-discussion

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page