Skip to content

a8n: Add Bitbucket Server support to burndown chart

Warren Gifford requested to merge bbs/burndown-chart into master

Created by: mrnugget

This extends the existing CalcCounts function we use to calculate changeset counts (used by the burndown chart) to take Bitbucket Server changeset events into account.

Differences between Bitbucket Server and GitHub:

  • On BBS a pull request is not "closed" but "declined"
  • On BBS a "changes requested" review is simply called "reviewed" in the event names
  • On BBS every reviewer only has one review state they can switch between
  • On BBS a reviewer can unapprove their previous approval (but only an approval! You cannot undo a "changes requested")

The changes here take all of these into account.

While writing the tests it occurred to me that I could write them on an even higher level and find an abstraction layer that lets me say "changes requested event" and that layer would map it to "changes requested" on GitHub and "reviewed" events on BBS. But right now these tests are easy to read and to debug, which are nice properties to conserve right now. I might take a stab at the new abstraction layer in the future though.

Test plan:

Merge request reports

Loading