Skip to content

notify_zulip: handle labels set when opening the pr #1974

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

Merged
merged 1 commit into from
May 7, 2025

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented May 6, 2025

Handle labels set when opening the PR as if they were added in notify_zulip handler.

We re-use messages_on_add, since it's the conceptually same thing as if they were manually added just after the PR was opened.

cc @apiraino @fmease
Fixes #1973

@Urgau Urgau requested a review from Kobzol May 6, 2025 18:34
IssuesAction::Closed | IssuesAction::Reopened => {
Ok(Some(parse_close_reopen_input(event, config)))
IssuesAction::Opened | IssuesAction::Closed | IssuesAction::Reopened => {
Ok(Some(parse_open_close_reopen_input(event, config)))
Copy link
Contributor

Choose a reason for hiding this comment

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

I was looking for a slightly more parseable (ha!) name for this function. parse_input()? get_notification_input()? Suggestions?

Copy link
Member Author

Choose a reason for hiding this comment

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

We already have a parse_label_change_input for label and unlabel events, I rather not make less distinctive.

Better have a descriptive function name than a short one that is confusing.

@Urgau Urgau added this pull request to the merge queue May 7, 2025
Merged via the queue into rust-lang:master with commit f6b2970 May 7, 2025
3 checks passed
@Urgau Urgau deleted the notify_zulip-opened branch May 7, 2025 17:10
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.

notify-zulip.<LABEL> should also handle IssuesAction::Open and treat it similar to IssuesAction::Labeled
3 participants