kentaro-m / auto-assign

🤖 A Probot app that adds reviewers to pull requests when pull requests are opened.
https://probot.github.io/apps/auto-assign/
ISC License
249 stars 55 forks source link

Auto-assign PR to author not working #141

Open Habitats opened 3 years ago

Habitats commented 3 years ago

Describe the bug Auto-assignment on PR not working anymore. It used to work, and without any config changes it just stopped.

This is our config:

addReviewers: false
addAssignees: author
skipKeywords:
  - wip
numberOfReviewers: 0

To Reproduce Steps to reproduce the behavior:

  1. Open PR
  2. See error

Expected behavior Author should be assigned to PR.

dirien commented 3 years ago

I can confirm this too!

jonasbn commented 3 years ago

I just tried with the following .github/auto_assign.yml and it worked:

# REF: https://probot.github.io/apps/auto-assign/

# Set to true to add reviewers to pull requests
addReviewers: true

# Set to true to add assignees to pull requests
addAssignees: 'author'

# A list of reviewers to be added to pull requests (GitHub user name)
reviewers:
  - jonasbn

# A list of keywords to be skipped the process that add reviewers if pull requests include it
#skipKeywords:
#  - wip

# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 0

# A list of assignees, overrides reviewers if set
# assignees:
#  - jonasbn

# A number of assignees to add to the pull request
# Set to 0 to add all of the assignees.
# Uses numberOfReviewers if unset.
# numberOfAssignees: 2

Note that I have quoted the keyword author. I look at the code, which either takes a boolean or a string, so I thought I might as well try it.

First attempt was unsuccessful, since I only pushed the branch, the assignment was not made until the PR was created, which happened second time I tried.

See the PR for details.

jonasbn commented 3 years ago

Never mind the above test, is also works without the quotes.

See my other PR for details

brunowego commented 2 years ago

I confirm this issue. If "quote" the author value works.