Skip to content

brammittendorff/automaticly-reopen-issue-gitlab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automaticly reopen Service Desk issues on Gitlab

This application will make sure you can automatily reopen Service Desk issues on Gitlab.

Requirements

  • python
  • pip
  • requirements.txt

Installation

Please make sure you test the webhook on https://webhook.site to see what value BOT_USERNAME should have in your case:

{
  "object_kind": "note",
  "event_type": "confidential_note",
  "user": {
    "id": 1337,
    "name": "GitLab Support Bot",
    "username": "support-bot",
    "avatar_url": "[REDACTED]",
    "email": "[REDACTED]"
  },
}

Environment variables

Create a .env file with the following contents:

SECRET_KEY="somesecretkeyfromdjango"
BOT_USERNAME="support-bot"
GITLAB_ACCESS_TOKEN="your-specialaccestokengitlab"
GITLAB_API_URL="https://gitlab.com/api/v4/projects/support/bot"
  • Note: remember if you are using this url to make sure you will use instead of a / the character /.

  • Note: if you want to set the x-gitlab-token to make sure unauthorized people can not use this webhook you can use the env variable: GITLAB_X_TOKEN

Installing the packages

pip install -r requirements.txt

Usage

You can deploy this project directly to Heroku with:

heroku create -a automaticly-reopen --region eu
git push heroku master
heroku config:set DISABLE_COLLECTSTATIC=1

Or run it locally with:

./manage.py runserver

And if you run it locally you can use a service like ngrok / localtunnel to test the webhooks.

About

Automaticly reopen issue with Service Desk in Gitlab

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published