diff --git a/.github/workflows/auto_assign_prs.yaml b/.github/workflows/auto_assign_prs.yaml deleted file mode 100644 index e74dddc2d8f7..000000000000 --- a/.github/workflows/auto_assign_prs.yaml +++ /dev/null @@ -1,63 +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 - -name: 'Auto assign PRs' -on: - pull_request_target: - types: [opened, ready_for_review] - -permissions: - pull-requests: write # For gh to edit assignees. - -jobs: - assign_reviewer: - runs-on: ubuntu-latest - steps: - - name: Harden Runner - uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 - with: - disable-sudo: true - egress-policy: block - # prettier-ignore - allowed-endpoints: > - api.github.com:443 - - - id: filter - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 - with: - filters: | - leads: - - '*.md' - - 'LICENSE' - - 'docs/project/principles/*' - - 'docs/project/evolution.md' - - 'docs/project/goals.md' - - 'docs/project/roadmap.md' - - 'proposals/*.md' - toolchain: - - 'toolchain/**' - - - id: assign-leads - if: steps.filter.outputs.leads == 'true' - uses: hkusu/review-assign-action@5bee595fdb9765d4a0bd35724b6302fa15569158 # v1.4.0 - with: - reviewers: KateGregory, chandlerc, zygoloid - max-num-of-reviewers: 1 - - - id: assign-toolchain - if: steps.filter.outputs.toolchain == 'true' - uses: hkusu/review-assign-action@5bee595fdb9765d4a0bd35724b6302fa15569158 # v1.4.0 - with: - reviewers: - chandlerc, danakj, dwblaikie, geoffromer, jonmeow, josh11b, zygoloid - max-num-of-reviewers: 1 - - - id: assign-fallback - if: | - steps.filter.outputs.leads != 'true' && - steps.filter.outputs.toolchain != 'true' - uses: hkusu/review-assign-action@5bee595fdb9765d4a0bd35724b6302fa15569158 # v1.4.0 - with: - reviewers: chandlerc, danakj, jonmeow, josh11b, zygoloid - max-num-of-reviewers: 1 diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 000000000000..67351404f108 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,24 @@ +# 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 + +# This file is only used for PR autoassignment. Branch protections don't enforce +# it. +# +# Syntax: +# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-syntax + +# Toolchain reviewers are used as a fallback. +* @carbon-language/toolchain-reviewers + +# Key project documents should be reviewed by leads. +/*.md @carbon-language/leads +/LICENSE @carbon-language/leads +/docs/project/evolution.md @carbon-language/leads +/docs/project/goals.md @carbon-language/leads +/docs/project/principles/* @carbon-language/leads +/docs/project/roadmap.md @carbon-language/leads +/proposals/*.md @carbon-language/leads + +# Toolchain code. +/toolchain @carbon-language/toolchain-reviewers diff --git a/docs/project/code_review.md b/docs/project/code_review.md index a1d23cf70cae..0911e1eb4e39 100644 --- a/docs/project/code_review.md +++ b/docs/project/code_review.md @@ -86,11 +86,11 @@ In Carbon, developers will focus on particular areas, loosely broken down as: - We split out auto-assignment by explorer, toolchain, and other files (including documentation). -[Auto-assignment](/.github/workflows/auto_assign_prs.yaml) will help find -owners, but won't always be perfect -- developers may take a PR they weren't -auto-assigned in order to help review go quickly. Contributors can also request -multiple reviewers, but it can be daunting to get feedback from a large number -of reviewers, so we suggest keeping the number of reviewers reasonably small. +[Auto-assignment](/CODEOWNERS) will help find owners, but won't always be +perfect -- developers may take a PR they weren't auto-assigned in order to help +review go quickly. Contributors can also request multiple reviewers, but it can +be daunting to get feedback from a large number of reviewers, so we suggest +keeping the number of reviewers reasonably small. Any reviews that explicitly request changes should be addressed, either with the changes or an explanation of why not, before a pull request is merged. Further, diff --git a/proposals/p1367.md b/proposals/p1367.md index 3c3d03606efa..d015cb3f0295 100644 --- a/proposals/p1367.md +++ b/proposals/p1367.md @@ -110,8 +110,9 @@ group access controls are the last word on who can commit PRs. ### Auto-assignment -This PR [introduces auto-assignment](/.github/workflows/auto_assign_prs.yaml) in -order to ensure PRs aren't lost. It provides categories of assignment, and a +This PR +[introduces auto-assignment](https://github.com/carbon-language/carbon-lang/pull/1367/files#diff-5e5db53c34ec04ba9da95c70d5c797f1be9f390f7e2bf18ca3149cbd99c277df) +in order to ensure PRs aren't lost. It provides categories of assignment, and a fallback for other PRs that don't have explicit assignment. ### Stacked PRs