auto-request-review icon indicating copy to clipboard operation
auto-request-review copied to clipboard

bug: workflow failed due to trying to request author as reviewer

Open MSevey opened this issue 1 year ago • 1 comments

Overview

Github user Nashqueue submitted a PR and the workflow failed to assign reviewers because the workflow picked Nashqueue as a reviewer.

Can we update the workflow to proactively check the PR author and exclude them from the list of potential reviewers?

Log

Example failure: https://github.com/rollkit/rollkit/actions/runs/6533811456/job/17739738877

Run necojackarc/[email protected]
  with:
    token: ***
    config: .github/auto_request_review.yml
    use_local: false
Fetching configuration file from the source branch
Fetching changed files in the pull request
Identifying reviewers based on the changed files
Identifying reviewers based on the author
"per_author" is not set; returning no reviewers for the author.
Adding other group members to reviewers if group assignment feature is on
Group assignment feature is disabled
Randomly picking reviewers if the number of reviewers is set
Requesting review to Manav-Aggarwal, tuxcanfly, Nashqueue
Error: HttpError: Review cannot be requested from pull request author.

auto_request_review.yml

reviewers:
  defaults:
    - code-owners
  groups:
    code-owners:
      - Nashqueue
      - tzdybal
      - gupadhyaya
    rollkit:
      - Manav-Aggarwal
      - S1nus
      - tuxcanfly
    devops:
      - smuu
      - sysrex
      - jrmanes
      - Bidon15
    celestia:
      - team:celestia
files:
  '**':
    - code-owners
    - rollkit
  '**/*Dockerfile':
    - devops
  '.github/**':
    - devops
options:
  ignore_draft: true
  ignored_keywords:
    - WIP
  number_of_reviewers: 3

workflow yml

  # See https://github.com/marketplace/actions/auto-request-review for more
  # information on how to use this action
  auto-request-review:
    if: ${{ inputs.run-auto-request-review }}
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
    steps:
      - uses: necojackarc/[email protected]
        with:
          # There is a rollkit level PAT_FOR_AUTO_REQUEST_REVIEW secret that
          # belongs to MSevey who should have sufficient access for all public
          # repos
          token: ${{ secrets.PAT_FOR_AUTO_REQUEST_REVIEW }}

cc @Nashqueue

MSevey avatar Oct 17 '23 13:10 MSevey