GitLab URL expander for Slack
- GitLab API v4
- Slack app and OAuth Access Token
- User URL
- e.g.
${GITLAB_BASE_URL}/:username
- e.g.
- Group URL
- e.g.
${GITLAB_BASE_URL}/:groupname
- e.g.
- Project URL
- e.g.
${GITLAB_BASE_URL}/:namespace/:reponame
- e.g.
- Issue URL
- e.g.
${GITLAB_BASE_URL}/:namespace/:reponame/issues/:iid
- e.g.
- MergeRequest URL
- e.g.
${GITLAB_BASE_URL}/:namespace/:reponame/merge_requests/:iid
- e.g.
- Job URL
- e.g.
${GITLAB_BASE_URL}/:namespace/:reponame/-/jobs/:id
- e.g.
- Pipeline URL
- e.g.
${GITLAB_BASE_URL}/:namespace/:reponame/pipelines/:id
- e.g.
- Blob URL
- e.g.
${GITLAB_BASE_URL}/:namespace/:reponame/blob/:sha1/:filename
- e.g.
- Commit URL
- e.g.
${GITLAB_BASE_URL}/:namespace/:reponame/commit/:sha1
- e.g.
- Project snippet URL
- e.g.
${GITLAB_BASE_URL}/:namespace/:reponame/snippets/:id
- e.g.
- Snippet URL
- e.g.
${GITLAB_BASE_URL}/snippets/:id
- e.g.
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
PORT
- default is
8000
- default is
GITLAB_API_ENDPOINT
- e.g.
https://your-gitlab.example.com/api/v4
- e.g.
GITLAB_BASE_URL
- e.g.
https://your-gitlab.example.com
- e.g.
GITLAB_PRIVATE_TOKEN
- Generate a personal access token with
api
scope
- Generate a personal access token with
SLACK_OAUTH_ACCESS_TOKEN
- see CREATE_SLACK_APP.md
- e.g.
xoxp-0000000000-0000000000-000000000000-00000000000000000000000000000000
SLACK_VERIFICATION_TOKEN
- Token for verify slack requests. This is optional, but recommended
- see. https://api.slack.com/docs/verifying-requests-from-slack#app_management_updates
TRUNCATE_LINES
- Line count to truncate the text (default. no truncate)
SENTRY_DSN
- Sentry DSN
- e.g.
https://[email protected]/0000000
Use latest gitpanda_linux_amd64
on https://github.com/sue445/gitpanda/releases
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
$ ./gitpanda --help
Usage of ./gitpanda:
-version
Whether showing version
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
- GitHub Container Registry (Recommended)
ghcr.io/sue445/gitpanda:latest
: Use latest versionghcr.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 versionus-docker.pkg.dev/gitpanda/gitpanda/app:vX.Y.Z
: Use specified versionus-docker.pkg.dev/gitpanda/gitpanda/app:edge
: The contents of the main branch are pushed to this tag
c.f https://cloud.google.com/kubernetes-engine/docs/how-to/managed-certs
2. Download and edit files in examples/kubernetes_manifests/
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}
e.g.
kubectl apply -f path/to/kubernetes_manifests/*.yaml
See followings
- .github/workflows/docker-gcp.yml
deploy_to_cloud_run
job - .github/cloud_run-service.yml
Recommend to use https://github.com/direnv/direnv
cp .envrc.example .envrc
vi .envrc
direnv allow