add @silent and @normal commands
This commit is contained in:
parent
c309f2b225
commit
9b2546c3ee
@ -70,12 +70,22 @@ final class PostFailedTests{
|
|||||||
$issue=$this->repo->getIssues(['q' => $name])[0]??null;
|
$issue=$this->repo->getIssues(['q' => $name])[0]??null;
|
||||||
|
|
||||||
// are there any instructions in comments?
|
// are there any instructions in comments?
|
||||||
$quiet=false;
|
$quiet=$silent=false;
|
||||||
foreach($issue->getComments() as $comment){
|
foreach($issue->getComments() as $comment){
|
||||||
if( stripos('@bot quiet',$comment->body)!==false ){
|
if( stripos('@bot quiet',$comment->body)!==false ){
|
||||||
$quiet=true;
|
$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, is the error the same?
|
||||||
if($issue){
|
if($issue){
|
||||||
|
Loading…
Reference in New Issue
Block a user