Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Apply label to issues with open dependencies #20

Closed
jcommelin opened this issue Oct 2, 2020 · 4 comments · Fixed by #22
Closed

Apply label to issues with open dependencies #20

jcommelin opened this issue Oct 2, 2020 · 4 comments · Fixed by #22

Comments

@jcommelin
Copy link

Would it be possible to automatically add a label to issues/PRs with open dependencies? (And auto-remove that label when all dependencies are closed?)

@jonabc
Copy link
Owner

jonabc commented Oct 2, 2020

@jcommelin thats an interesting idea, but I don't think that would be something to handle in this action directly.

IIUC, you're wanting to detect when all of a "parent" issue's linked "child" issues/PRs are closed. In that case the unit of action is the parent. This action deals with the inverse, detecting a change to an individual "child" issue or PR and updating each parent reference. In order to keep this action simple and composable for a workflow file, it's out of scope to do further calculations or actions on the parents.

I can add as output to this action every detected parent reference that was operated on and the action that was taken, i.e. marked complete or incomplete. A followup step could then check those issues and see if all of the references are closed/open, what labels are present, whatever else is desired, and add or remove labels accordingly. That followup step could be implemented using something like action/github-script for one-offs, or written as it's own action if it needed to be reused and made publicly available for others.

I'll leave this open to track adding some outputs to the action that might be helpful.

@jcommelin
Copy link
Author

Thanks for the fast reply. Such output would already be very helpful. I don't have any experience with writing actions myself, but I can probably hack something together.

The use case: easily filter for PRs that are waiting for a review, but are not blocked by other open PRs.

@jonabc
Copy link
Owner

jonabc commented Oct 2, 2020

Ah cool, 👍 I'll try to get that updated today or tomorrow. Or, if you wanted to open a PR for the change I'd be happy to review it 🙏

@jcommelin
Copy link
Author

Thanks for your very fast action!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants