-
Notifications
You must be signed in to change notification settings - Fork 97
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
Improve conditions Props Bot runs under. #966
Conversation
This improves the logic controlling when Props Bot runs to: - not run for draft PRs. - not run when comments are deleted (this should hardly ever happen). - not run on closed PRs.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core SVNIf you're a Core Committer, use this list when committing to
GitHub Merge commitsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
@desrosj What about in the case of spam drive-by comments? If they get deleted or hidden due to spam, would the bot purge the props properly? |
The next time it runs it would, yes. If the PR is ready to merge and there's still a spam account listed, you can manually rerun the bot by adding the |
github.event_name == 'pull_request_target' && github.event.action != 'labeled' || | ||
'props-bot' == github.event.label.name | ||
) && | ||
( ! github.event.pull_request.draft && github.event.pull_request.state == 'open' || ! github.event.issue.draft && github.event.issue.state == 'open' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the &&s are evaluated before the || in this line? Consider adding parenthesis to clarify the comparisons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Left one small question, not a blocker.
LOL. And naturally I didn't add the |
Summary
This improves the logic controlling when Props Bot runs to: