Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Randomly sample N users from a team when assigning PRs #1388

Open
ianks opened this issue Sep 17, 2020 · 4 comments
Open

Randomly sample N users from a team when assigning PRs #1388

ianks opened this issue Sep 17, 2020 · 4 comments
Assignees

Comments

@ianks
Copy link

ianks commented Sep 17, 2020

Our use case is that we want to be able to assign a random team member to a dependabot PR, only when the status checks fail. Currently, this is not possible.

So something like:

pull_request_rules:
  - name: Assign team member to  dependabot PR
    conditions:
      - author=dependabot[bot]
      - status-failure=test
    actions:
      assign:
        count: 1
        teams:
          - myteam
@jd
Copy link
Member

jd commented Sep 17, 2020

What's wrong with assigning to a GitHub team?

@jd jd self-assigned this Sep 25, 2020
@sileht
Copy link
Member

sileht commented Sep 25, 2020

Already !

@ianks
Copy link
Author

ianks commented Sep 26, 2020

That was fast!!

@jd
Copy link
Member

jd commented Sep 26, 2020

@ianks I wrote it for request_reviews for now, not assign. I'll probably make a second PR for that part.

mergify bot pushed a commit that referenced this issue Sep 30, 2020
This adds a new option `random_count` to the request_reviews action which
allows to randomly select users and teams to request a review.

Weight can be assigned to users and teams.

The selected set of teams and users is always the same for a particular pull
request.

Related #1388
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants