add "@bot quiet" to suppress repeat warnings
This commit is contained in:
parent
e2e428b28c
commit
c309f2b225
@ -69,14 +69,24 @@ final class PostFailedTests{
|
||||
// get any existing issue
|
||||
$issue=$this->repo->getIssues(['q' => $name])[0]??null;
|
||||
|
||||
// are there any instructions in comments?
|
||||
$quiet=false;
|
||||
foreach($issue->getComments() as $comment){
|
||||
if( stripos('@bot quiet',$comment->body)!==false ){
|
||||
$quiet=true;
|
||||
}
|
||||
}
|
||||
|
||||
// if existing issue, is the error the same?
|
||||
if($issue){
|
||||
if( $this->doesMessageMatch($issue->body,$message,$att) ){
|
||||
if($quiet){return;}
|
||||
$issue->addComment("Failed again. Same errors as [above]($issue->html_url#issue-{$issue->id})");
|
||||
return;
|
||||
}else{
|
||||
foreach($issue->getComments() as $comment){
|
||||
if( $this->doesMessageMatch($comment->body,$message,$att) ){
|
||||
if($quiet){return;}
|
||||
$issue->addComment("Failed again. Same errors as [above]($issue->html_url#issuecomment-{$comment->id})");
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user