diff --git a/.github/workflows/project_actions.yml b/.github/workflows/project_actions.yml index 6e56f125ea..b21946f0ee 100644 --- a/.github/workflows/project_actions.yml +++ b/.github/workflows/project_actions.yml @@ -20,11 +20,12 @@ jobs: # - PR issue comment which is not form Ynbot # - PR review comment which is not Hound (or any other bot) # - PR review submitted which is not from Hound (or any other bot) and is not 'Changes requested' + # - make sure it only runs if not forked repo # ----------------------------- if: | - (github.event_name == 'issue_comment' && github.event.comment.user.id != 82967070) || - (github.event_name == 'pull_request_review_comment' && github.event.comment.user.type != 'Bot') || - (github.event_name == 'pull_request_review' && github.event.review.state != 'changes_requested' && github.event.review.user.type != 'Bot') + (github.event_name == 'issue_comment' && github.event.pull_request.head.repo.owner.login == 'ynput' && github.event.comment.user.id != 82967070) || + (github.event_name == 'pull_request_review_comment' && github.event.pull_request.head.repo.owner.login == 'ynput' && github.event.comment.user.type != 'Bot') || + (github.event_name == 'pull_request_review' && github.event.pull_request.head.repo.owner.login == 'ynput' && github.event.review.state != 'changes_requested' && github.event.review.user.type != 'Bot') steps: - name: Move PR to 'Review In Progress' uses: leonsteinhaeuser/project-beta-automations@v2.1.0 @@ -42,7 +43,7 @@ jobs: # ----------------------------- name: pr_review_requested runs-on: ubuntu-latest - if: github.event_name == 'pull_request_review' && github.event.review.state == 'changes_requested' + if: github.event_name == 'pull_request_review' && github.event.pull_request.head.repo.owner.login == 'ynput' && github.event.review.state == 'changes_requested' steps: - name: Set branch env run: echo "BRANCH_NAME=${{ github.event.pull_request.head.ref}}" >> $GITHUB_ENV