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

More refinements to Props Bot run conditions. #58617

Merged
merged 3 commits into from
Feb 2, 2024
Merged
Changes from all commits
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
21 changes: 11 additions & 10 deletions .github/workflows/props-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ on:
issue_comment:
type:
- created
- deleted
# This event will run everytime a new PR review is initially submitted.
pull_request_review:
types:
Expand All @@ -29,7 +28,6 @@ on:
pull_request_review_comment:
types:
- created
- deleted

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
Expand All @@ -56,17 +54,20 @@ jobs:
pull-requests: write
contents: read
timeout-minutes: 20
# The job should only run if:
# The job will run when pull requests are open, ready for review and:
#
# - A pull request review is created or commented on.
# - An issue comment is added to a pull request.
# - A pull request is opened, synchronized, or reopened.
# - A comment is added to the pull request.
# - A review is created or commented on.
# - The pull request is opened, synchronized, marked ready for review, or reopened.
# - The `props-bot` label is added to the pull request.
if: |
contains( fromJSON( '["pull_request_review", "pull_request_review_comment"]' ), github.event_name ) ||
( github.event_name == 'issue_comment' && github.event.issue.pull_request ) ||
github.event_name == 'pull_request_target' && github.event.action != 'labeled' && ! github.pull_request.draft && github.pull_request.state == 'open' ||
'props-bot' == github.event.label.name
(
github.event_name == 'issue_comment' && github.event.issue.pull_request ||
contains( fromJSON( '["pull_request_review", "pull_request_review_comment"]' ), github.event_name ) ||
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' )

steps:
- name: Gather a list of contributors
Expand Down
Loading