Skip to content

Commit

Permalink
Add some temporary extra debug information (#570)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergio Castaño Arteaga <[email protected]>
  • Loading branch information
tegioz authored Dec 11, 2024
1 parent bfe7209 commit 278c113
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async fn event(
Err(EventError::InvalidBody(err)) => {
return Err((StatusCode::BAD_REQUEST, EventError::InvalidBody(err).to_string()))
}
Err(EventError::UnsupportedEvent) => return Ok(()),
Err(EventError::UnsupportedEvent) => return Ok("unsupported event"),
};
trace!(?event, "event received");

Expand All @@ -112,6 +112,7 @@ async fn event(
Some(cmd) => {
trace!(?cmd, "command detected");
cmds_tx.send(cmd).await.unwrap();
return Ok("command queued");
}
None => {
if let Event::PullRequest(event) = event {
Expand All @@ -123,7 +124,7 @@ async fn event(
}
};

Ok(())
Ok("no command detected")
}

/// Verify that the signature provided is valid.
Expand Down
1 change: 1 addition & 0 deletions src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ impl CommandsHandler {
Ok(cmd) = self.cmds_rx.recv() => {
match cmd {
Command::CreateVote(input) => {
debug!(repo=input.repository_full_name, issue=input.issue_number, "processing create vote command");
_ = self.create_vote(&input).await;
}
Command::CancelVote(input) => {
Expand Down

0 comments on commit 278c113

Please sign in to comment.