Skip to content

Add milestone labels to PRs when related issues are milestoned #71

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Andarist
Copy link

@Andarist Andarist commented Dec 2, 2024

This PR aims to add automation for scenarios when issues are milestoned after the fixing PR is already open.

Comment on lines +24 to +25
await run("Adding repro tags from issue bodies", addReprosLabelOnIssue)
await run("Adding milestone labels to related PRs", addMilestoneLabelsToRelatedPRs)
Copy link
Member

Choose a reason for hiding this comment

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

The promise was unawaited intentionally before; otherwise if the handler takes more than 10 seconds, the request will error out due to a timeout on GitHub's side of the webhook.

Copy link
Author

Choose a reason for hiding this comment

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

what do u recommend then? those run actions are awaited in other webhooks so I followed suite here. Should this just kick off both "jobs"? Or maybe the old one should not be awaited but the new one should be awaited?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, they are? Weird.... Maybe we assume they're fast enough but I'd have to check the logs

Comment on lines +19 to +22
const houseKeepingLabels = {
"For Milestone Bug": false,
"For Backlog Bug": false,
};
Copy link
Member

Choose a reason for hiding this comment

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

This all seems familiar; is the code not the same as addMilestoneLabelsToPRs?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, they are the same. They serve different purpose and I decided against unifying both places, it felt like an abstraction would hurt the readability here and this code is simple enough

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

Successfully merging this pull request may close these issues.

2 participants