You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to create an automated workflow in some repositories I'm working on so an issue gets added to a new Beta Project whenever it's assigned to a milestone (no matter which one). I found this repository and I think the Commands functionality could be extended so it provides the behaviour I'm looking for in a reusable way.
I started looking into the code and the path seemed straightforward. Adding the onMilestoned handler and in the Commands.ts file ensuring that the match method would let my case go through and end up executing the addToProjectaction in the perform method.
Also for the command format I was thinking on something like this:
Then I realised that there is some logic that basically prevents certain actions to be performed if there is not a label based interaction. For example, before executing the addToProject command in the perform method there is the following check:
The issue.labels.includes(command.name) portion of the conditional would make my case fail as no label actions will be involved. Actually I think that logic must be in the matches logic not in the perform method so we can keep the command validation in one place.
So before jumping into a PR I wanted to double check that I'm not missing anything or maybe what I'm trying to accomplish does not make sense.
Thanks!
The text was updated successfully, but these errors were encountered:
I wanted to create an automated workflow in some repositories I'm working on so an issue gets added to a new Beta Project whenever it's assigned to a milestone (no matter which one). I found this repository and I think the
Commands
functionality could be extended so it provides the behaviour I'm looking for in a reusable way.I started looking into the code and the path seemed straightforward. Adding the
onMilestoned
handler and in theCommands.ts
file ensuring that thematch
method would let my case go through and end up executing theaddToProject
action
in theperform
method.Also for the command format I was thinking on something like this:
Then I realised that there is some logic that basically prevents certain actions to be performed if there is not a label based interaction. For example, before executing the
addToProject
command in theperform
method there is the following check:The
issue.labels.includes(command.name)
portion of the conditional would make my case fail as no label actions will be involved. Actually I think that logic must be in thematches
logic not in theperform
method so we can keep the command validation in one place.So before jumping into a PR I wanted to double check that I'm not missing anything or maybe what I'm trying to accomplish does not make sense.
Thanks!
The text was updated successfully, but these errors were encountered: