Create comments (notes) on a GitLab merge request.
291
Tool to create comments on GitLab merge requests.
To be able to run this command you need to pass some configuration variables to it. There are two ways you can do it: Via command line flags or with enviornment variables.
docker run --rm brpaz/gitlab-mr-commenter \
-e GITLAB_MR_COMMENTER_ACCESS_TOKEN=<token> \
-e GITLAB_MR_COMMENTER_PROJECT_ID=<project_id> \
-e GITLAB_MR_COMMENTER_MR_ID=<gitlab-mr-id> \
-e GITLAB_MR_COMMENTER_MR_COMMENT_CONTENT=<comment-content>
docker run --rm brpaz/gitlab-mr-commenter --access-token=<token> --project-id=<project_id> --mr-id=<mr-id> <comment_content>
By default it will try to connect to the GitLab hosted version API at (https://gitlab.com/api/v4). If you want to use this in a self hosted GitLab, you can override this setting using the Environment variable "GITLAB_MR_COMMENTER_API_URL" or using the command line flag "api-url".
If you want to develop locally you need to have go > 1.11 installed with "go modules" support enabled. Alternatively you can use Docker and Docker-compose.
A makefile is provided with common tasks.
make build
./build/gitlab-mr-commenter
If you want to use environment variables to configure the command, an .env.dist file is provided. You can load your variables into your terminal session using the following commands:
cp .env.dist .env
export $(egrep -v '^#' .env | xargs)
make run-compose
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Content type
Image
Digest
Size
9.3 MB
Last updated
over 7 years ago
docker pull brpaz/gitlab-mr-commenter