Enhance issue commands to assign all projects at once #225
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changed?
Modifies the logic in the issue commands action to execute all the addToProject
with labels that the issue currently has.
Because github executes this action for each label, it is possible that if an issue
is assigned multiple labels, one of the pipelines will fail because of consecutive runs
and rate limits.
This is a way go guarantee the projects will be correctly assigned since there's no
error or problem at instructing github to assign an issue to a project that is already
assigned.
Why don't we do this with all the other commands?
The other commands execute actions that are supposed to be a 'one-time' action, e.g.: add a comment
or close the issue.
If we execute these actions on each pipeline run merely because the issue has a label, we will
be executing the same action multiple times e.g. commenting the same twice or more for each label added to an issue
Is this the best solution?
No. the best solution is to prevent rate limits by using a dedicated github app for this action.
We are working on creating a custom github app for this purpose and this will be here to guarantee
tghe addToProject action works while we test the new app and rate limits.