Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance issue commands to assign all projects at once #225

Merged
merged 7 commits into from
Sep 13, 2024

Conversation

academo
Copy link
Member

@academo academo commented Sep 12, 2024

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.

@academo academo requested a review from a team as a code owner September 12, 2024 14:48
@academo academo self-assigned this Sep 12, 2024
api/octokit.js Outdated Show resolved Hide resolved
Copy link

@briangann briangann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@academo academo merged commit befe2ea into main Sep 13, 2024
3 checks passed
@academo academo deleted the academo/test-label-issues branch September 13, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

4 participants