Skip to content

Commit c3bc798

Browse files
Fix issues with bot queueing.
1 parent ce97b57 commit c3bc798

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

site/src/server.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,8 @@ pub fn handle_github(request: github::Request, data: &InputData) -> ServerResult
535535
return Ok(github::Response);
536536
}
537537

538-
if request.comment.author_association != github::Association::Owner ||
539-
data.config.users.contains(&request.comment.user.login) {
538+
if request.comment.author_association != github::Association::Owner &&
539+
!data.config.users.contains(&request.comment.user.login) {
540540
post_comment(&data.config, &request,
541541
"Insufficient permissions to issue commands to rust-timer.")?;
542542
return Ok(github::Response);
@@ -555,7 +555,7 @@ pub fn handle_github(request: github::Request, data: &InputData) -> ServerResult
555555
client.get(&format!("{}/commits/{}", request.issue.repository_url, commit))
556556
.send().map_err(|_| String::from("cannot get commit"))?
557557
.json().map_err(|_| String::from("cannot deserialize commit"))?;
558-
if commit_response.parents.len() != 1 {
558+
if commit_response.parents.len() != 2 {
559559
post_comment(&data.config, &request,
560560
&format!("Bors try commit {} unexpectedly has {} parents.",
561561
commit_response.sha, commit_response.parents.len()))?;

0 commit comments

Comments
 (0)