-
Notifications
You must be signed in to change notification settings - Fork 26
Simpler way to get state of most recent workflow #37
Comments
Thanks for the feedback. The confusion about why |
Aha, that makes sense. Thanks for the explanation! I've been meaning to look into conditional workflows, but haven't gotten round to it. Based on that, I guess what I'm really after is a new field on /project/:project_slug/pipeline/ which exposes an overall Is your ideas site a better place to ask for API enhancements than here? |
Possibly related: I am looking for a way to determine if there are other Why?I'm attempting to build an Orb that helps avoid Stacking Deploys. I'd like two different, but related strategies:
In both strategies, we need to hit the API to fetch Workflows for the same branch, and filter them by status. And we need some way to determine those Workflows are "after" the current one. So far as I can tell, this isn't currently available in the API, nor in v2. Perhaps it could be added as per @lucas42's request here? |
I'd like to know the state of the most recent workflow for each of my projects.
The only way I can figure out how to do this right now is:
items[0].id
(assuming the first item is the most recent - that's not entirely clear in the docs)workflows.ids[0]
(The fact thatids
is an array, but so far I've only ever seen a single value in it, suggests there's a level of potential complexity here that I don't understand)status
(This bit is feels intuitive as it uses the same language as the UI)Whilst this may work, I have a couple of problems with doing it that way:
Can I suggest a new endpoint? For example: GET /project/:project_slug/workflows
It'd return an array of workflows, sorted by most recent first. Each workflow would be an object containing the data currently surfaced in /workflow/:workflow_id
This would allow a single call to be made for each project and I wouldn't have to get my head around new concepts just for navigating the API.
The text was updated successfully, but these errors were encountered: