GithubHelp home page GithubHelp logo

tommy-meacham / auto-assign Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kentaro-m/auto-assign

0.0 1.0 0.0 876 KB

๐Ÿค– A Probot app that adds reviewers to pull requests when pull requests are opened.

Home Page: https://probot.github.io/apps/auto-assign/

License: ISC License

Dockerfile 1.80% JavaScript 0.74% TypeScript 95.94% HCL 1.52%

auto-assign's Introduction

Probot: Auto Assign

CircleCI Coverage Status Join the community on Spectrum

A GitHub App built with Probot that adds reviewers/assignees to pull requests when pull requests are opened.

screenshot

How it works

  • When the pull request is opened, automatically add reviewers/assignees to the pull request.
  • If the number of reviewers is specified, randomly add reviewers/assignees to the pull request.
  • If reviewers/assignees are separated into groups in the config file, randomply select the number of reviewers from each group.
  • If the title of the pull request contains a specific keyword, do not add reviewers/assignees to the pull request.

Usage

  1. Install the app.
  2. Create .github/auto_assign.yml in your repository.
# Set to true to add reviewers to pull requests
addReviewers: true

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

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

# 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:
#   - assigneeA

# 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

# Set to true to add reviewers from different groups to pull requests
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

# Set to true to add assignees from different groups to pull requests
useAssigneeGroups: false

# A list of assignees, split into different froups, to be added to pull requests (GitHub user name)
# assigneeGroups:
#   groupA:
#     - assigneeA
#     - assigneeB
#     - assigneeC
#   groupB:
#     - assigneeD
#     - assigneeE
#     - assigneeF

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

Development

# Install dependencies
npm install

# Run typescript
npm run build

# Run the bot
npm start

# Test before submitting a PR
npm test

See Contributing for more information about making improvements to auto-assign.

Deploy

Glitch

Remix on Glitch

  1. Configure a new app on Github.
    • For the Homepage URL, use your repository url or your homepage url: https://random-word.glitch.me/probot.
    • For the Webhook URL, use this URL (again, updating the domain to match yours): https://random-word.glitch.me/. Notice that we left off the /probot.
    • For the Webhook Secret, just use "development". Input the same value in .env file.
    • On the Permissions & webhooks tab, add read and write permissions for pull requests.
    • On the Permissions & webhooks tab, subscribe to Pull request events.
    • Save your changes.
    • Download the private key.
  2. Click the Install tab, and install your app into one of your repositories.
  3. Click the New File button (at left) and type .data/private-key.pem. Then click Add File. Copy the contents of the private key you downloaded after creating the app, paste it into the new file in Glitch.
  4. Edit the .env file (at left) with your app credentials.
    • Check the example as below.
  5. Wait for app to load. A green Live label should show up next to the Show button when it's finished loading.
# The ID of your GitHub App; You can find this in the About section of your Github app
APP_ID=

# The Webhook Secret; This is generated by you and then inputted in the settings of your Github app.
WEBHOOK_SECRET=development

# The path to a private key file; This is set by you and then set the contents of the private key you downloaded after creating the app.
PRIVATE_KEY_PATH=.data/private-key.pem

GitHub Actions

Add .github/main.workflow to the repository you want to run the app.

workflow "Add reviewers/assignees to Pull Requests" {
  on = "pull_request"
  resolves = "Auto Assign"
}

action "Auto Assign" {
  uses = "kentaro-m/auto-assign@master"
  secrets = ["GITHUB_TOKEN"]
}

Contributing

If you have suggestions for how auto-assign could be improved, or want to report a bug, open an issue! We'd love all and any contributions.

For more, check out the Contributing Guide.

License

ISC ยฉ 2018 Kentaro Matsushita

auto-assign's People

Contributors

kentaro-m avatar tomeach avatar colindean avatar renovate-bot avatar pjurczynski avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.