Create report for an epic

Proposal

Currently there is no way for GitLab to report percent completion on an epic. To get around this we need a way to get data on a specific epic, and all of it's child epics (and all of their children... and so on) so that we can calculate the total number of issues assigned to a top level epic (an epic that has no parent). Getting the total issues assigned and open/close status of each issue will let us calculate percent completion.

R&D work discovered that the following endpoints can be used to gather this information.

An example epic to use for testing and developing this feature is &4 (closed).

Details

The script should take as an argument:

  • the iid of an epic (using above example the iid would be 4)

The script should return (print out):

  • at the very least total issues: %d, open: %d, closed: %d (%d%%)
  • --show-issues will add the reference and title of each issue
  • --show-epics will add the reference and title of each epic
  • If both show options are given the output should be organized in a similar tree fashion as &4 (closed)

The standard argparse and logging methods should be used with default log level set to info and -v or --verbose setting log level to debug.

Edited by Nathan Knowles