Giter VIP home page Giter VIP logo

kbme's Introduction

kbme

Build Status codecov npm semantic-release

Gather kanban metrics from your JIRA instance:

  • Lead time
  • Cycle time
  • Throughput

This tool was inspired by one of the talks on the european Atlassian Summit 2017

Atlassian Summit

Watch the video to understand how metrics are collected.

Installation

npm install -g kbme

Usage

Default output is prettified json

kbme >> metrics.json

Use the kbme command to gather information for a particular period of time

kbme --csv --start 2017-08-01 --finish 2017-08-31 >> metrics.csv

Collect metrics for the last 90 days using 15 days intervals

kbme --report --interval 15 --period 90 --csv >> metrics.csv

Adds a new line to the previous report using data from last 15 days

kbme --period 15 --csv >> metrics.csv

Options

-c, --csv         Outputs comma separated values [false]
-k, --keys        Comma separated list of projects keys
-t, --types       Issue types filter [NOT IN (Epic)]
-d, --done        Done status [Done]
-t, --todo        ToDo status [ToDo]
-s, --start       Period start [2017-08-01]
-f, --finish      Period finish [2017-08-15]
-q, --query       JIRA JQL Query [project IN (%keys) AND status IN (%done) AND resolutiondate > %start AND resolutiondate < %finish AND issuetype %types]
-u, --user        JIRA username []
-p, --pass        JIRA password
-j, --jira        JIRA REST API URL [https://server-name.com]
-e, --endpoint    JIRA JQL /search endpoint [%jira/jira/rest/api/2/search?jql=%jql&expand=changelog&maxResults=1000]
--period          Period of time to collect metrics, in days [90]
-i, --interval    Interval to split metrics on when using --report, in days [15]

Automatic environment variables detection

You can create a .env file from which kbme will read environment variables, use this to setup a project you want constant metrics from.

Sample .env file

KBME_JIRA="http://server-url.com"
KBME_USER="MrBobry"
KBME_PASS="DzienBobry"
KBME_AUTO=15
KBME_REPORT=false
KBME_PERIOD=365
KBME_INTERVAL=15
KBME_START="2017-01-01"
KBME_FINISH="2017-06-01"
KBME_DONE="Done"
KBME_TODO="In Progress"
KBME_KEYS="ELEMENTS"
KBME_TYPES="NOT IN (Epic)"
KBME_QUERY="project IN (%keys) AND status IN (%done) AND resolutiondate > %start AND resolutiondate < %finish AND issuetype %types"
KBME_ENDPOINT="%jira/jira/rest/api/2/search?jql=%jql&expand=changelog"

Pay special attention to the query and endpoint options, they have special characters (%opt) that can be used as a template to replace by another option value.

Debug

Log JQL queries into the console

DEBUG=jql kbme

Contributing

Feel free to fill an issue and submit a pull request if you find any problems.

IMPORTANT: Always create feature branches from the beta branch.

Automated versioning

We use semantic-release to automate the versioning process, make sure you follow the commit message convention explained here.

HEADS UP: If you are not sure how write a commit message, make your changes in your feature branch and run npm run commit and follow the assistant.

Releases

Beta

Create a feature branch and make a pull-request to beta branch. Once its merged, you can try and install the package using @beta dist tag on npm.

> npm i -g kbme@beta

Production

Create a new pull-request from beta to master branch. Once it gets merged, the final version will be released using @latest dist tag on npm.

kbme's People

Contributors

alazurenko avatar dependabot-support avatar dependabot[bot] avatar ricardocasares avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

kbme's Issues

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Once you have installed CI on this repository, you’ll need to re-trigger Greenkeeper’s initial Pull Request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organiszation’s settings page, under Installed GitHub Apps.

Add an option to print debug log

Would be nice to have an option to debug executed JQL queries, just to confirm the output is correct and double check in JIRA search.

$ DEBUG="jql" kbme
$ > project in (PK) AND status in (Done) ... etc

In general I use debug to do this.

The automated release is failing 🚨

🚨 The automated release from the beta branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the beta branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


The push permission to the Git repository is required.

semantic-release cannot push the version tag to the branch beta on remote Git repository with URL https://[secure]@github.com/ricardocasares/kbme.git.

Please refer to the authentication configuration documentation to configure the Git credentials on your CI environment and make sure the repositoryUrl is configured with a valid Git URL.


Good luck with your project ✨

Your semantic-release bot 📦🚀

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.