Allow listing builds by pipeline

We have a large monorepo, and are using drone-tree-config to select only subfolders with changes to run in each build. So the root level pipelines will run every time, but subfolder pipelines will run only when there are changes. This means some pipelines will only run once in dozens or hundreds of builds potentially.

It would be really useful for us to see a list of all pipelines, and be able to filter to builds that include that pipeline.

I would like to see another tab on the repo page that gives a breakdown in this way:


It could show a list of unique stage names there with the last build that included it, and then allow you to drill into a listing of builds that have the stage.

This would be extremely useful in chasing the history of a pipeline that runs only infequently.

Implementation wise, I think this would require a few new api routes (list unique stages, and list builds with stage), and the necessary db queries for them, as well as some UI work.

I’d be willing to dig in and give it a shot if any of this seems agreeable.