bug: null error on new issue
This commit is contained in:
parent
9b2546c3ee
commit
96ef72c71c
@ -69,26 +69,27 @@ final class PostFailedTests{
|
||||
// get any existing issue
|
||||
$issue=$this->repo->getIssues(['q' => $name])[0]??null;
|
||||
|
||||
// are there any instructions in comments?
|
||||
$quiet=$silent=false;
|
||||
foreach($issue->getComments() as $comment){
|
||||
if( stripos('@bot quiet',$comment->body)!==false ){
|
||||
$quiet=true;
|
||||
$silent=false;
|
||||
}
|
||||
if( stripos('@bot silent',$comment->body)!==false ){
|
||||
$silent=true;
|
||||
$quiet=true;
|
||||
}
|
||||
if( stripos('@bot normal',$comment->body)!==false ){
|
||||
$silent=false;
|
||||
$quiet=false;
|
||||
}
|
||||
}
|
||||
if($silent){return;}
|
||||
|
||||
// if existing issue, is the error the same?
|
||||
// if existing issue.
|
||||
if($issue){
|
||||
// are there any instructions in comments?
|
||||
$quiet=$silent=false;
|
||||
foreach($issue->getComments() as $comment){
|
||||
if( stripos('@bot quiet',$comment->body)!==false ){
|
||||
$quiet=true;
|
||||
$silent=false;
|
||||
}
|
||||
if( stripos('@bot silent',$comment->body)!==false ){
|
||||
$silent=true;
|
||||
$quiet=true;
|
||||
}
|
||||
if( stripos('@bot normal',$comment->body)!==false ){
|
||||
$silent=false;
|
||||
$quiet=false;
|
||||
}
|
||||
}
|
||||
if($silent){return;}
|
||||
|
||||
//is the error the same?
|
||||
if( $this->doesMessageMatch($issue->body,$message,$att) ){
|
||||
if($quiet){return;}
|
||||
$issue->addComment("Failed again. Same errors as [above]($issue->html_url#issue-{$issue->id})");
|
||||
|
Loading…
Reference in New Issue
Block a user