Checking if a workflow is in progress from a Github integration job



I’m writing a series of workflows that trigger a series of releases for a number of packages from a monorepo, and I want to make a Github integration that prevents merging a new pull request into master on the monorepo while a previous release (triggered from a previous merge into master) is ongoing. Looking at the CircleCi API it looks like there is no easy way to detect whether a workflow is currently in progress. What you can do using the API is detect which builds/jobs are currently in progress in a project on master, then look into the workflow from within those builds, using this endpoint: Is there a simpler way to accomplish what I’m trying to do?