From adaa6264577c362deec72dcd625e3e9abcf7baaa Mon Sep 17 00:00:00 2001 From: Carlisia Date: Tue, 6 Apr 2021 10:52:34 -0700 Subject: [PATCH 1/4] Add Abbie to PR review requests Signed-off-by: Carlisia --- .github/assign_author.yml | 1 + .github/auto_assign.yml | 14 --------- .github/reviewers.yaml | 37 +++++++++++++++++++++++ .github/workflows/auto_assign_prs.yml | 6 ++-- .github/workflows/auto_request_review.yml | 16 ++++++++++ 5 files changed, 58 insertions(+), 16 deletions(-) create mode 100644 .github/assign_author.yml delete mode 100644 .github/auto_assign.yml create mode 100644 .github/reviewers.yaml create mode 100644 .github/workflows/auto_request_review.yml 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 From 18a8888e9f91244aeda79335b9ae0f1f807f0b17 Mon Sep 17 00:00:00 2001 From: Carlisia Date: Wed, 14 Apr 2021 12:17:17 -0700 Subject: [PATCH 2/4] Consolidate config files and fix path Signed-off-by: Carlisia --- .github/assign_author.yml | 1 - .github/{reviewers.yaml => auto-assignees.yaml} | 5 ++++- .github/workflows/auto_assign_prs.yml | 2 +- .github/workflows/auto_request_review.yml | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) delete mode 100644 .github/assign_author.yml rename .github/{reviewers.yaml => auto-assignees.yaml} (89%) diff --git a/.github/assign_author.yml b/.github/assign_author.yml deleted file mode 100644 index d2ce90ce3..000000000 --- a/.github/assign_author.yml +++ /dev/null @@ -1 +0,0 @@ -addAssignees: author \ No newline at end of file diff --git a/.github/reviewers.yaml b/.github/auto-assignees.yaml similarity index 89% rename from .github/reviewers.yaml rename to .github/auto-assignees.yaml index f62760303..1b7c74523 100644 --- a/.github/reviewers.yaml +++ b/.github/auto-assignees.yaml @@ -34,4 +34,7 @@ options: # 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 + number_of_reviewers: 2 + +# This assigns a PR to its author + addAssignees: author \ No newline at end of file diff --git a/.github/workflows/auto_assign_prs.yml b/.github/workflows/auto_assign_prs.yml index ff63ed60b..22b0b4780 100644 --- a/.github/workflows/auto_assign_prs.yml +++ b/.github/workflows/auto_assign_prs.yml @@ -14,5 +14,5 @@ jobs: - name: Set the author of a PR as the assignee - uses: kentaro-m/auto-assign-action@v1.1.1 with: - configuration-path: ".github/assign_author.yml" + configuration-path: ".github/auto-assignees.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 index c7d6b39e0..f4ba66cf2 100644 --- a/.github/workflows/auto_request_review.yml +++ b/.github/workflows/auto_request_review.yml @@ -13,4 +13,4 @@ jobs: uses: necojackarc/auto-request-review@v0.5.1 with: token: ${{ secrets.GITHUB_TOKEN }} - config: .github/reviewers.yml \ No newline at end of file + config: .github/auto-assignees.yml \ No newline at end of file From ff17066d2d7dd891ef4201b2e92ea7f2e8654c23 Mon Sep 17 00:00:00 2001 From: Carlisia Date: Wed, 14 Apr 2021 12:44:38 -0700 Subject: [PATCH 3/4] Fix path Signed-off-by: Carlisia --- .github/auto-assignees.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/auto-assignees.yaml b/.github/auto-assignees.yaml index 1b7c74523..632f73cc5 100644 --- a/.github/auto-assignees.yaml +++ b/.github/auto-assignees.yaml @@ -16,7 +16,7 @@ reviewers: - a-mccarthy files: - 'public/**': + 'site/**': - tech-writer '**/*.md': - tech-writer From a6c0a51dc8c19e2ba0213e99dcad1c998051d009 Mon Sep 17 00:00:00 2001 From: Carlisia Date: Wed, 14 Apr 2021 13:17:02 -0700 Subject: [PATCH 4/4] Fix format Signed-off-by: Carlisia --- .github/workflows/auto_assign_prs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto_assign_prs.yml b/.github/workflows/auto_assign_prs.yml index 22b0b4780..9f53b71a7 100644 --- a/.github/workflows/auto_assign_prs.yml +++ b/.github/workflows/auto_assign_prs.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set the author of a PR as the assignee - - uses: kentaro-m/auto-assign-action@v1.1.1 + uses: kentaro-m/auto-assign-action@v1.1.1 with: configuration-path: ".github/auto-assignees.yml" repo-token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file