diff --git a/.github/assign_author.yml b/.github/assign_author.yml new file mode 100644 index 000000000..d2ce90ce3 --- /dev/null +++ b/.github/assign_author.yml @@ -0,0 +1 @@ +addAssignees: author \ No newline at end of file diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml deleted file mode 100644 index b4c68aabb..000000000 --- a/.github/auto_assign.yml +++ /dev/null @@ -1,14 +0,0 @@ -addReviewers: true -addAssignees: author - -# Only require 2, random reviewers. -# TODO expand this to support using reviewGroups -numberOfReviewers: 2 - -reviewers: - - nrb - - ashish-amarnath - - carlisia - - zubron - - dsu-igeek - - jenting diff --git a/.github/reviewers.yaml b/.github/reviewers.yaml new file mode 100644 index 000000000..f62760303 --- /dev/null +++ b/.github/reviewers.yaml @@ -0,0 +1,37 @@ +reviewers: + # The default reviewers + defaults: + - maintainers + + groups: + maintainers: + - nrb + - ashish-amarnath + - carlisia + - zubron + - dsu-igeek + - jenting + + tech-writer: + - a-mccarthy + +files: + 'public/**': + - tech-writer + '**/*.md': + - tech-writer + '/design/**': # Technical design requests are ".md" files but should be reviewed by maintainers + - maintainers + +options: + ignore_draft: true + ignored_keywords: + - WIP + - wip + - DO NOT MERGE + + enable_group_assignment: true + + # Randomly pick reviewers up to this number. + # Do not set this option if you'd like to assign all matching reviewers. + number_of_reviewers: 2 \ No newline at end of file diff --git a/.github/workflows/auto_assign_prs.yml b/.github/workflows/auto_assign_prs.yml index d23576730..ff63ed60b 100644 --- a/.github/workflows/auto_assign_prs.yml +++ b/.github/workflows/auto_assign_prs.yml @@ -1,4 +1,5 @@ -name: "Auto Assign PR Reviewers" +name: "Auto Assign Author" + # pull_request_target means that this will run on pull requests, but in the context of the base repo. # This should mean PRs from forks are supported. on: @@ -10,7 +11,8 @@ jobs: add-reviews: runs-on: ubuntu-latest steps: + - name: Set the author of a PR as the assignee - uses: kentaro-m/auto-assign-action@v1.1.1 with: - configuration-path: ".github/auto_assign.yml" + configuration-path: ".github/assign_author.yml" repo-token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/.github/workflows/auto_request_review.yml b/.github/workflows/auto_request_review.yml new file mode 100644 index 000000000..c7d6b39e0 --- /dev/null +++ b/.github/workflows/auto_request_review.yml @@ -0,0 +1,16 @@ +name: "Auto Request Review" + +on: + pull_request: + types: [opened, ready_for_review, synchronize, reopened] + +jobs: + auto-request-review: + name: Auto Request Review + runs-on: ubuntu-latest + steps: + - name: Request a PR review based on files types/paths, and/or groups the author belongs to + uses: necojackarc/auto-request-review@v0.5.1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + config: .github/reviewers.yml \ No newline at end of file