Coder Social home page Coder Social logo

joshghent / pullb0t Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 136 KB

🤖Bot for posting new Gitlab Merge requests to a Slack Webhook with automatic JIRA integration

TypeScript 96.66% Dockerfile 2.37% Shell 0.98%
bot gitlab slack jira merge-request pull-requests

pullb0t's Introduction

sample message

Pullb0t

A bot for posting new Gitlab Merge requests to a Slack Webhook with automatic JIRA integration

Developed with ❤️ by CloudCall



Features

  • Automatically detect JIRA ticket numbers in the branch name or commit message
  • Post all new non-WIP merge requests to a given Slack Webhook URL

Setup

Environment Variables

The bot requires a few config options. Here's how to get them

JIRA Details

It is recommended you create a new "bot" user account and assign it global admin privileges (so it can view all boards)

JIRA_URL="company.atlassian.net" - Note the lack of the http/https!
JIRA_USERNAME="bot" - the JIRA username used to query the API
JIRA_PASSWORD="password" - the JIRA password for the above user

Slack

  1. Add the "Incoming Webhook" integration
  2. Add a new configuration - setup where the webhook messages will go, and the user they will be posted as
  3. Copy the "Webhook URL" on the page

Gitlab

GITLAB_URL="https://git.company.gitlab.com" - Just the URL for your git instance

Standard

  1. Clone the project - $ git clone https://github.com/joshghent/pullb0t.git
  2. Copy of the .env.example file and fill in the details
  3. Run npm start!

Docker

docker run -d --restart always \ --name pullb0t \
  --env JIRA_URL="company.atlassian.net" \
  --env JIRA_USERNAME="botuser" \
  --env JIRA_PASSWORD="password" \
  --env SLACK_WEBHOOK_URL="HOOK_URL" \
  --env GITLAB_URL="GITLAB_URL" -p 1337:3000  joshghent/pullb0t:latest

Bugs

Please create a new issue here

License

MIT - CloudCall

Author

Josh Ghent on behalf of CloudCall

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.