gitpanda

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

gitpanda 🐼

GitLab URL expander for Slack

Latest Version test build docker-ghcr docker-gcp Maintainability Coverage Status

Example

example1

example2

Requirements

Supported URL format

  • User URL
    • e.g. ${GITLAB_BASE_URL}/:username
  • Group URL
    • e.g. ${GITLAB_BASE_URL}/:groupname
  • Project URL
    • e.g. ${GITLAB_BASE_URL}/:namespace/:reponame
  • Issue URL
    • e.g. ${GITLAB_BASE_URL}/:namespace/:reponame/issues/:iid
  • MergeRequest URL
    • e.g. ${GITLAB_BASE_URL}/:namespace/:reponame/merge_requests/:iid
  • Job URL
    • e.g. ${GITLAB_BASE_URL}/:namespace/:reponame/-/jobs/:id
  • Pipeline URL
    • e.g. ${GITLAB_BASE_URL}/:namespace/:reponame/pipelines/:id
  • Blob URL
    • e.g. ${GITLAB_BASE_URL}/:namespace/:reponame/blob/:sha1/:filename
  • Commit URL
    • e.g. ${GITLAB_BASE_URL}/:namespace/:reponame/commit/:sha1
  • Project snippet URL
    • e.g. ${GITLAB_BASE_URL}/:namespace/:reponame/snippets/:id
  • Snippet URL
    • e.g. ${GITLAB_BASE_URL}/snippets/:id
  • Epic URL
    • e.g. ${GITLAB_BASE_URL}/groups/:groupname/-/epics/:iid
  • Work item URL
    • e.g. ${GITLAB_BASE_URL}/:namespace/:reponame/-/work_items/:iid

Running standalone

Download latest binary from https://github.com/sue445/gitpanda/releases

PORT=8000 \
GITLAB_API_ENDPOINT=https://your-gitlab.example.com/api/v4 \
GITLAB_BASE_URL=https://your-gitlab.example.com \
GITLAB_PRIVATE_TOKEN=xxxxxxxxxx \
SLACK_OAUTH_ACCESS_TOKEN=xoxp-0000000000-0000000000-000000000000-00000000000000000000000000000000 \
SLACK_VERIFICATION_TOKEN=xxxxxxxxx \
TRUNCATE_LINES=5 \
./gitpanda
Environment variables
  • PORT
    • default is 8000
  • GITLAB_API_ENDPOINT
    • e.g. https://your-gitlab.example.com/api/v4
  • GITLAB_BASE_URL
    • e.g. https://your-gitlab.example.com
  • GITLAB_PRIVATE_TOKEN
    • Generate a personal access token with read_api (recommended) or api scope
  • SLACK_OAUTH_ACCESS_TOKEN
    • see CREATE_SLACK_APP.md
    • e.g. xoxp-0000000000-0000000000-000000000000-00000000000000000000000000000000
  • SLACK_VERIFICATION_TOKEN
  • TRUNCATE_LINES
    • Line count to truncate the text (default. no truncate)
  • SENTRY_DSN
    • Sentry DSN
    • e.g. https://xxxxxxxxxxxxx@sentry.example.com/0000000
  • DEBUG_LOGGING
    • Output debug log if non-empty character set
    • e.g. DEBUG_LOGGING=1

Running with AWS (Lambda + API Gateway + Parameter Store)

Use latest gitpanda_linux_amd64 on https://github.com/sue445/gitpanda/releases

Environment variables

One of the following is required

Environment Key of Parameter Store
GITLAB_API_ENDPOINT GITLAB_API_ENDPOINT_KEY
GITLAB_BASE_URL GITLAB_BASE_URL_KEY
GITLAB_PRIVATE_TOKEN GITLAB_PRIVATE_TOKEN_KEY
SLACK_OAUTH_ACCESS_TOKEN SLACK_OAUTH_ACCESS_TOKEN_KEY
SLACK_VERIFICATION_TOKEN SLACK_VERIFICATION_TOKEN_KEY
TRUNCATE_LINES

When you want to store to Parameter Store, please store as SecureString

aws parameter_store

Example

Arguments

$ ./gitpanda --help
Usage of ./gitpanda:
  -version
    	Whether showing version

Running with docker

Run latest version

docker run --rm -it ghcr.io/sue445/gitpanda

Run with specified version

docker run --rm -it ghcr.io/sue445/gitpanda:vX.Y.Z
Images
  • GitHub Container Registry (Recommended)
    • ghcr.io/sue445/gitpanda:latest: Use latest version
    • ghcr.io/sue445/gitpanda:vX.Y.Z: Use specified version
  • Google Artifact Registry: If you want to run this app on Cloud Run, use this image
    • us-docker.pkg.dev/gitpanda/gitpanda/app:latest: Use latest version
    • us-docker.pkg.dev/gitpanda/gitpanda/app:vX.Y.Z: Use specified version
    • us-docker.pkg.dev/gitpanda/gitpanda/app:edge: The contents of the main branch are pushed to this tag

Running with Kubernetes

1. [GKE] Create static IP and managed certificate if necessary

c.f https://cloud.google.com/kubernetes-engine/docs/how-to/managed-certs

2. Download and edit files in examples/kubernetes_manifests/
3. Create secrets

e.g.

kubectl create secret generic gitpanda-secret \
    --from-literal=gitlab_private_token=${GITLAB_PRIVATE_TOKEN} \
    --from-literal=slack_oauth_access_token=${SLACK_OAUTH_ACCESS_TOKEN} \
    --from-literal=slack_verification_token=${SLACK_VERIFICATION_TOKEN}
4. apply manifests

e.g.

kubectl apply -f path/to/kubernetes_manifests/*.yaml

Running with Cloud Run

See followings

Development

Recommend to use https://github.com/direnv/direnv

cp .envrc.example .envrc
vi .envrc
direnv allow

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL