Copy link to headline:@sit-onyx/github-metrics
.
Copy link to headline:Changelog
A full changelog can be found here.
Copy link to headline:Installation
Install the npm package with your corresponding package manager:
Copy link to headline:Create a client
Since your GitHub project might be set up differently than the ones of other users, this package is designed to be flexible so it is able to work for any project setup.
Before you can start calculation metrics for your project, you need to create and configure a client so it understands the setup of your GitHub project. Below is an example configuration, adjust it to fit your specific project.
Copy link to headline:GitHub token
The GitHub GraphQL API for accessing projects requires authentication using an personal access token.
To get a new token, go to https://github.com/settings/tokens(opens in a new tab) and create a new personal access token. In the permissions section, select "read:project"
Copy the generated token and pass it to the client via the authToken option when calling createClient() (see above). It is recommended to e.g. use an environment variable for this.
Copy link to headline:Metrics
Below you can find a list of available metrics that you can easily collect using this package.
If you haven't already, create a client first.
Copy link to headline:Mean story size
Calculates the mean / average story size of an item in the given iteration.
Copy link to headline:Bug fixing ratio
Calculates the bug fixing ratio in the given iteration (how much time is spend on bugs in relation to other stories).
Copy link to headline:Throughput
Calculates the throughput in the given iteration (amount of items with status "finished").