Git Product home page Git Product logo

danger-jira_issue_links's Introduction

danger-jira_issue_links

Plugin for Danger

This plugin collects issue mentions from git commit messages and obtains info from Jira issue tracker.

By default, commit message should start with pattern [TASK-123] (this can be configured), where TASK is Jira project Id and 123 is issue number.
For example, for commit message:

[JSGLK-1145] Resolve bug with incorrect price calculation

Results are passed out as a table in the Danger comment for merge request.

Screenshot

Installation

If you use Bundler, add next line to Gemfile and execute bundle install

gem 'danger-jira_issue_links'

Or install manually

$ gem install danger-jira_issue_links

Usage

In Dangerfile add next lines:

Configure connection to you Jira instance

jira_issue_links.jira_username = "email"
jira_issue_links.jira_password = "password"
jira_issue_links.jira_site = "https://your-company.atlassian.net"

You can configure regexp that finds issue id in commit messages.

For example - issue id can be anywhere in message, but it starts with TASK-

Fix bug as per TASK-1234
jira_issue_links.issue_number_regexp = /(TASK-\d+)/

By default it is set to /^\[(\w+-\d+)\]/

The include_resolves_keyword option adds phrase Resolves TASK-123 in output report. It allows GitLab Jira plugin to automatically close issues (see: GitLab Jira integration).

jira_issue_links.include_resolves_keyword = true

Find all issue mentions in commit messages, obtain info from Jira and make table of links

jira_issue_links.print_links_with_titles

Find all issue mentions in commit messages and make links.
Not required access to Jira, needs only base url - jira_site.

jira_issue_links.print_links_only

Development

  1. Clone this repo
  2. Run bundle install to setup dependencies.
  3. Run bundle exec rake spec to run the tests.
  4. Use bundle exec guard to automatically have tests run as you make changes.
  5. Make your changes.

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.