From a1e41ee43efd42eaebe33472ce0f28312d4bcc63 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Fri, 2 Aug 2024 13:49:55 -0500 Subject: [PATCH 1/2] Add automated review action --- .github/workflows/reviewer.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/reviewer.yaml diff --git a/.github/workflows/reviewer.yaml b/.github/workflows/reviewer.yaml new file mode 100644 index 0000000000000..42f1e932697d9 --- /dev/null +++ b/.github/workflows/reviewer.yaml @@ -0,0 +1,24 @@ +--- +name: Automated review +on: # yamllint disable-line rule:truthy + pull_request: + types: + - opened + - reopened + - review_requested + +permissions: + pull-requests: write + +jobs: + automated_review: + name: Generate automated review + runs-on: ubuntu-latest + if: ${{ github.event.action != 'review_requested' || github.event.requested_reviewer.login == 'github-actions[bot]' }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: ros-infrastructure/rosdistro-reviewer@main + with: + token: ${{ github.token }} From 40f36457e09d77265a7c070c433e5bad486a641a Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Wed, 20 Nov 2024 12:44:16 -0600 Subject: [PATCH 2/2] Don't run review based on review requests --- .github/workflows/reviewer.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reviewer.yaml b/.github/workflows/reviewer.yaml index 42f1e932697d9..084df64f65b0f 100644 --- a/.github/workflows/reviewer.yaml +++ b/.github/workflows/reviewer.yaml @@ -4,8 +4,9 @@ on: # yamllint disable-line rule:truthy pull_request: types: - opened + - ready_for_review - reopened - - review_requested + - synchronize permissions: pull-requests: write @@ -14,7 +15,7 @@ jobs: automated_review: name: Generate automated review runs-on: ubuntu-latest - if: ${{ github.event.action != 'review_requested' || github.event.requested_reviewer.login == 'github-actions[bot]' }} + if: ${{ !github.event.pull_request.draft }} steps: - uses: actions/checkout@v4 with: