leadtime

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 2 Imported by: 0

README

Coverage Test Execution Time Go Report Card reviewdog LinuxUnitTest MacUnitTest WindowsUnitTest

leadtime - calculate PR lead time statistics on GitHub

leedtime is a command that outputs statistics about the time it takes for a GitHub Pull Request to be merged. The leadtime command was developed under the influence of the following books.

The motivation for developing the leadtime command is to measure lead time for changes. I used unit test coverage as a measure of software quality. However, as the number of unit tests increased but the code was not rewritten, I questioned whether the quality was improving.

Therefore, I considered measuring lead time, one of the indicators presented in the above book.

How to install

Use "go install"

If you does not have the golang development environment installed on your system, please install golang from the golang official website.

 go install github.com/nao1215/leadtime@latest
Use homebrew (aarch64)
$ brew tap nao1215/tap
$ brew install nao1215/tap/leadtime

How to use

If you want to check github.com/nao1215/sqly repository, you execute bellow.

$ leadtime stat --owner=nao1215 --repo=sqly
PR      LeadTime[min]   Title
#29     21144   Bump github.com/fatih/color from 1.13.0 to 1.14.1
#28     12      Change golden pacakge import path
#27     17      add unit test for infra package
#26     686     Add basic unit test for shell
#25     1850    Bump github.com/google/go-cmp from 0.2.0 to 0.5.9
#24     6458    Add unit test for model package
#23     187     Change golden test package from goldie to golden and more
#22     1       Add sqlite3 syntax completion
#21     1769    Add unit test for argument paser
#20     53      Feat dump tsv ltsv json
#19     6       Add featuer thar print date by markdown table format
#18     10      Feat import ltsv
#17     117     Feat import tsv
#15     57      Fix panic bug when import file that is without extension
#14     42      Feat import json
#13     139     Fix input delays when increasing records
#12     18      Add header command
#11     1552    Fixed a display collapse problem when multiple lines are entered
#10     4       Fixed a bug that caused SQL to fail if there was a trailing semicolon
#9      29      Add move cursor function in intaractive shell
#8      3       Fixed a bug in which the wrong arguments were used
#7      76      Added CSV output mode
#6      222     Improve execute query
#5      498     Add history usecase, repository, infra. sqly manage history by sqlite3
#4      139     Add function that execute select query
#3      37      Add import command
#2      57      Add .tables command
#1      127     Add .exit/.help command and history manager

[statistics]
 Total PR(Closed/Merged) = 28
 Lead Time(Max)          = 21144[min]
 Lead Time(Min)          = 1[min]
 Lead Time(Sum)          = 35310[min]
 Lead Time(Ave)          = 1261.07[min]
 Lead Time(Median)       = 66.50[min]

Features to be added

  • CSV output format
  • JSON output format
  • Markdown file output
  • Supports GitHub Actions
  • Exclude the bot's PR
  • faster by goroutine

Contributing / Contact

First off, thanks for taking the time to contribute! heart Contributions are not only related to development. For example, GitHub Star motivates me to develop!

If you would like to send comments such as "find a bug" or "request for additional features" to the developer, please use one of the following contacts.

LICENSE

The leadtime project is licensed under the terms of MIT LICENSE.

Documentation

Overview

Package main is leadtime command entrypoint.

Directories

Path Synopsis
Package config get setting from environment variable or configuration file.
Package config get setting from environment variable or configuration file.
domain
model
Package model is domain model and business logic.
Package model is domain model and business logic.
infrastructure
github
Package github is http client for GitHub API.
Package github is http client for GitHub API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL