diff --git a/.github/workflows/project_actions.yml b/.github/workflows/project_actions.yml index 95e63b564f..36b88f2886 100644 --- a/.github/workflows/project_actions.yml +++ b/.github/workflows/project_actions.yml @@ -5,21 +5,48 @@ on: types: [opened, assigned] pull_request_review: types: [submitted] + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] jobs: - pr_review_requested: - name: pr_review_requested + pr_review_started: + name: pr_review_started runs-on: ubuntu-latest - if: github.event_name == 'pull_request_review' && github.event.review.state == 'changes_requested' + # ----------------------------- + # conditions are: + # - 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' + # ----------------------------- + 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') steps: - - name: Move PR to 'Change Requested' + - name: Move PR to 'Review In Progress' uses: leonsteinhaeuser/project-beta-automations@v2.1.0 with: gh_token: ${{ secrets.YNPUT_BOT_TOKEN }} organization: ynput project_id: 11 resource_node_id: ${{ github.event.pull_request.node_id }} - status_value: Change Requested + status_value: Review In Progress + + # pr_review_requested: + # name: pr_review_requested + # runs-on: ubuntu-latest + # if: github.event_name == 'pull_request_review' && github.event.review.state == 'changes_requested' + # steps: + # - name: Move PR to 'Change Requested' + # uses: leonsteinhaeuser/project-beta-automations@v2.1.0 + # with: + # gh_token: ${{ secrets.YNPUT_BOT_TOKEN }} + # organization: ynput + # project_id: 11 + # resource_node_id: ${{ github.event.pull_request.node_id }} + # status_value: Change Requested size-label: name: pr_size_label