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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/handlers/validate_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use crate::{
config::{ValidateConfig, CONFIG_FILE_NAME},
github::IssuesAction,
handlers::{Context, IssuesEvent},
};
use tracing as log;
Expand All @@ -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.

) {
return Ok(None);
}
// All processing needs to be done in parse_input (instead of
// handle_input) because we want this to *always* run. handle_input
// requires the config to exist in triagebot.toml, but we want this to run
Expand Down
Loading