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

Ability to randomly select developers for Bot PRs #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sdivelbiss
Copy link

We have a lot of outstanding automated bot PRs that none of the developers want to deal with. This would allow you to list various developers that would be randomly selected to be assigned to Bot (dependabot) PRs.

Added:
random: boolean - will be ignored if user type is not Bot
randomAssignees: string[] - list of user names for bot to choose from

@kentaro-m
Copy link
Owner

Hi, @sdivelbiss.

You can use pull_request_target event as trigger workflows to handle open pull requests from bots like Dependabot.

When using it, there are a few security aspects that you need to understand.

See below for details:
https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#pull_request_target
https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#pull-request-events-for-forked-repositories

name: 'Auto Assign'
on:
  pull_request_target: # Change here
    types: [opened, ready_for_review]

jobs:
  add-reviews:
    runs-on: ubuntu-latest
    steps:
      - uses: kentaro-m/[email protected]

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

Successfully merging this pull request may close these issues.

2 participants