Skip to content

Commit

Permalink
SKARA-2236
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaosongzs committed Jul 11, 2024
1 parent 45468cd commit 7cd0152
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,18 @@ static String filterOutCommands(String body) {

private boolean ignoreComment(HostUser author, String body, ZonedDateTime createdTime, ZonedDateTime lastDraftTime, boolean isComment) {
if (pr.repository().forge().currentUser().equals(author)) {
return !PullRequestConstants.READY_FOR_SPONSOR_MARKER_PATTERN.matcher(body).find();
if (pr.isOpen()) {
return !PullRequestConstants.READY_FOR_SPONSOR_MARKER_PATTERN.matcher(body).find();
} else {
return true;
}
}
if (bot.ignoredUsers().contains(author.username())) {
return !PullRequestConstants.READY_FOR_SPONSOR_MARKER_PATTERN.matcher(body).find();
if (pr.isOpen()) {
return !PullRequestConstants.READY_FOR_SPONSOR_MARKER_PATTERN.matcher(body).find() && pr.isOpen();
} else {
return true;
}
}

// Check if this comment only contains command lines
Expand Down

0 comments on commit 7cd0152

Please sign in to comment.