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

Limit validate_config actions. #1804

Merged
merged 1 commit into from
May 3, 2024

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented May 2, 2024

This limits which actions the validate_config handler will handle. There was a problem where it was validating the config on every action. This means that if there is an invalid config, and any action was performed on the PR (like adding a label, or assigning someone), it would post a comment about the invalid config.

This is particularly a problem with old closed PRs that modified triagebot.toml. Minor actions like adding milestones or labels shouldn't re-trigger validation.

Fixes #1802

@@ -13,6 +14,12 @@ pub(super) async fn parse_input(
event: &IssuesEvent,
_config: Option<&ValidateConfig>,
) -> Result<Option<()>, String> {
if !matches!(
event.action,
IssuesAction::Opened | IssuesAction::Reopened | IssuesAction::Synchronize
Copy link
Member

Choose a reason for hiding this comment

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

Huh, what is Synchronize?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whenever commits are pushed.

@jackh726 jackh726 merged commit 739a9d9 into rust-lang:master May 3, 2024
2 checks passed
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.

validate_config should not run on closed PRs
2 participants