Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if commit author is blacklisted before checking if they are whitelisted #830

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
extract variable to shorten next line
maorfr committed Feb 13, 2022
commit 25342bd7b4ba79ab0a919e05e564504fcb25bf4d
Original file line number Diff line number Diff line change
@@ -359,7 +359,8 @@ private void updatePR(GHPullRequest ghpr, GHIssueComment comment, boolean isWebh

// the author of the PR could have been whitelisted since its creation
GHUser pullRequestAuthor = getPullRequestAuthor();
if (!accepted && !helper.checkBlackListCommitAuthor(pullRequestAuthor.getLogin()) && helper.isWhitelisted(pullRequestAuthor)) {
String pullRequestAuthorName = pullRequestAuthor.getLogin();
if (!accepted && !helper.checkBlackListCommitAuthor(pullRequestAuthorName) && helper.isWhitelisted(pullRequestAuthor)) {
LOGGER.log(Level.INFO, "Pull request #{0}'s author has been whitelisted", new Object[] {id});
setAccepted(false);
}