bug: null error on new issue

This commit is contained in:
James 2020-05-03 09:18:42 +01:00
parent 9b2546c3ee
commit 96ef72c71c

View File

@ -69,6 +69,8 @@ final class PostFailedTests{
// get any existing issue // get any existing issue
$issue=$this->repo->getIssues(['q' => $name])[0]??null; $issue=$this->repo->getIssues(['q' => $name])[0]??null;
// if existing issue.
if($issue){
// are there any instructions in comments? // are there any instructions in comments?
$quiet=$silent=false; $quiet=$silent=false;
foreach($issue->getComments() as $comment){ foreach($issue->getComments() as $comment){
@ -87,8 +89,7 @@ final class PostFailedTests{
} }
if($silent){return;} if($silent){return;}
// if existing issue, is the error the same? //is the error the same?
if($issue){
if( $this->doesMessageMatch($issue->body,$message,$att) ){ if( $this->doesMessageMatch($issue->body,$message,$att) ){
if($quiet){return;} if($quiet){return;}
$issue->addComment("Failed again. Same errors as [above]($issue->html_url#issue-{$issue->id})"); $issue->addComment("Failed again. Same errors as [above]($issue->html_url#issue-{$issue->id})");