diff --git a/.github/assign_prs/explorer.yaml b/.github/assign_prs/explorer.yaml deleted file mode 100644 index 70b2e7a61f7a..000000000000 --- a/.github/assign_prs/explorer.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# Part of the Carbon Language project, under the Apache License v2.0 with LLVM -# Exceptions. See /LICENSE for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -# Set to true to add reviewers to pull requests -addReviewers: true - -# Set to true to add assignees to pull requests -addAssignees: false - -# A list of reviewers to be added to pull requests (GitHub user name) -reviewers: - - geoffromer - - jonmeow - - jsiek - - zygoloid - -# A number of reviewers added to the pull request -# Set 0 to add all the reviewers (default: 0) -numberOfReviewers: 1 diff --git a/.github/assign_prs/fallback.yaml b/.github/assign_prs/fallback.yaml deleted file mode 100644 index afa64d0ab506..000000000000 --- a/.github/assign_prs/fallback.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# Part of the Carbon Language project, under the Apache License v2.0 with LLVM -# Exceptions. See /LICENSE for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -# Set to true to add reviewers to pull requests -addReviewers: true - -# Set to true to add assignees to pull requests -addAssignees: false - -# A list of reviewers to be added to pull requests (GitHub user name) -reviewers: - - chandlerc - - jonmeow - - josh11b - - zygoloid - -# A number of reviewers added to the pull request -# Set 0 to add all the reviewers (default: 0) -numberOfReviewers: 1 diff --git a/.github/assign_prs/leads.yaml b/.github/assign_prs/leads.yaml deleted file mode 100644 index 88b19d764df5..000000000000 --- a/.github/assign_prs/leads.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Part of the Carbon Language project, under the Apache License v2.0 with LLVM -# Exceptions. See /LICENSE for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -# Set to true to add reviewers to pull requests -addReviewers: true - -# Set to true to add assignees to pull requests -addAssignees: false - -# A list of reviewers to be added to pull requests (GitHub user name) -reviewers: - - KateGregory - - chandlerc - - zygoloid - -# A number of reviewers added to the pull request -# Set 0 to add all the reviewers (default: 0) -numberOfReviewers: 1 diff --git a/.github/assign_prs/toolchain.yaml b/.github/assign_prs/toolchain.yaml deleted file mode 100644 index 16cef7cc890d..000000000000 --- a/.github/assign_prs/toolchain.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Part of the Carbon Language project, under the Apache License v2.0 with LLVM -# Exceptions. See /LICENSE for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -# Set to true to add reviewers to pull requests -addReviewers: true - -# Set to true to add assignees to pull requests -addAssignees: false - -# A list of reviewers to be added to pull requests (GitHub user name) -reviewers: - - chandlerc - - jonmeow - - zygoloid - -# A number of reviewers added to the pull request -# Set 0 to add all the reviewers (default: 0) -numberOfReviewers: 1 diff --git a/.github/workflows/assign_prs.yaml b/.github/workflows/assign_prs.yaml index 4e8fce84cd8e..14b72ddd6543 100644 --- a/.github/workflows/assign_prs.yaml +++ b/.github/workflows/assign_prs.yaml @@ -4,7 +4,7 @@ name: 'Auto Assign' on: - pull_request: + pull_request_target: types: [opened, ready_for_review] jobs: @@ -30,60 +30,31 @@ jobs: - id: assign-leads if: steps.changes.outputs.leads == 'true' - uses: kentaro-m/auto-assign-action@v1.2.1 + uses: hkusu/review-assign-action@v1.3.0 with: - configuration-path: '.github/assign_prs/leads.yaml' + reviewers: KateGregory, chandlerc, zygoloid + max-num-of-reviewers: 1 - id: assign-explorer if: steps.changes.outputs.explorer == 'true' - uses: kentaro-m/auto-assign-action@v1.2.1 + uses: hkusu/review-assign-action@v1.3.0 with: - configuration-path: '.github/assign_prs/explorer.yaml' + reviewers: geoffromer, jonmeow, jsiek, zygoloid + max-num-of-reviewers: 1 - id: assign-toolchain if: steps.changes.outputs.toolchain == 'true' - uses: kentaro-m/auto-assign-action@v1.2.1 + uses: hkusu/review-assign-action@v1.3.0 with: - configuration-path: '.github/assign_prs/toolchain.yaml' + reviewers: chandlerc, jonmeow, zygoloid + max-num-of-reviewers: 1 - id: assign-fallback if: steps.changes.outputs.leads != 'true' && steps.changes.outputs.explorer != 'true' && steps.changes.outputs.toolchain != 'true' - uses: kentaro-m/auto-assign-action@v1.2.1 + uses: hkusu/review-assign-action@v1.3.0 with: - configuration-path: '.github/assign_prs/fallback.yaml' -# TODO: Consider the below. While private it currently fails more sharply, but -# may be a better post-public choice. -# -# - id: assign-leads -# if: steps.changes.outputs.leads == 'true' -# uses: hkusu/review-assign-action@v1.3.0 -# with: -# reviewers: KateGregory, chandlerc, zygoloid -# max-num-of-reviewers: 1 -# -# - id: assign-explorer -# if: steps.changes.outputs.explorer == 'true' -# uses: hkusu/review-assign-action@v1.3.0 -# with: -# reviewers: geoffromer, jonmeow, jsiek, zygoloid -# max-num-of-reviewers: 1 -# -# - id: assign-toolchain -# if: steps.changes.outputs.toolchain == 'true' -# uses: hkusu/review-assign-action@v1.3.0 -# with: -# reviewers: chandlerc, jonmeow, zygoloid -# max-num-of-reviewers: 1 -# -# - id: assign-fallback -# if: -# steps.changes.outputs.leads != 'true' && -# steps.changes.outputs.explorer != 'true' && -# steps.changes.outputs.toolchain != 'true' -# uses: hkusu/review-assign-action@v1.3.0 -# with: -# reviewers: chandlerc, jonmeow, josh11b, zygoloid -# max-num-of-reviewers: 1 + reviewers: chandlerc, jonmeow, josh11b, zygoloid + max-num-of-reviewers: 1 diff --git a/docs/project/code_review.md b/docs/project/code_review.md index b7ab5e269522..b18969e2e5e5 100644 --- a/docs/project/code_review.md +++ b/docs/project/code_review.md @@ -82,10 +82,8 @@ In Carbon, developers will focus on particular areas, loosely broken down as: - [Implementation team](groups.md#implementation-team): general changes. - - We split out auto-assignment by - [explorer](/.github/assign_prs/explorer.yaml), - [toolchain](/.github/assign_prs/toolchain.yaml), and - [other files, including documentation](/.github/assign_prs/fallback.yaml). + - We split out auto-assignment by explorer, toolchain, and other files + (including documentation). [Auto-assignment](/.github/workflows/assign_prs.yaml) will help find owners, but won't always be perfect -- developers may take a PR they weren't auto-assigned