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 based on changes #118

Closed hitmands closed 3 years ago

hitmands commented 4 years ago

Is your feature request related to a problem? Please describe. It is normally the case, while working with monorepos, for multiple teams to own the same codebase but work on different packages (e.g. lerna, yarn workspaces, etc.). It'd be great to provide some support for these use cases where a group would be assigned to a pr if a specific glob matches.

Describe the solution you'd like Extend the group feature so that if a specific glob produces matches then the group is requested a review.

useReviewGroups: true

# A list of reviewers, split into different groups, to be added to pull requests (GitHub user name)
reviewGroups:
  groupA:
    - reviewerA
    - reviewerB
    - reviewerC
  groupB:
    - reviewerD
    - reviewerE
    - reviewerF

paths:
  groupA: 
    - "./packages/pkg-a/**/*.*"
    - "./glob/for/shared/files"

  groupB: 
    - "./packages/pkg-b/**/*.*"
    - "./glob/for/shared/files"

Additional context In the given example, if a change happens on ./packages/pkg-a/**/*., then we would assign groupA; if a change happens on ./packages/pkg-b/**/*., then we would assign groupB; if a change happens on /glob/for/shared/files, then we would assign both groupA and groupb;


I'd like to investigate a propose a pull request to implement it.

bdauria commented 4 years ago

It would be a great addition. Another useful distribution pattern would be depending on labels, in addition to actual change in files.

bogdandrutu commented 4 years ago

I would really love to see this feature implemented