From a50feb64ceb3e591c470dc2f3d1621005892e648 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Tue, 6 Oct 2026 17:18:20 +0000 Subject: [PATCH] Simplify proposal labels and fix GitHub label workflows (#7904) We now only use a single `proposal` label on proposal PRs rather than separate state labels (`proposal draft`, `proposal rfc`, `proposal accepted`, `proposal declined`, and `proposal deferred`), as draft, open, merged, and closed PR states already capture the proposal lifecycle. - Remove the `proposal_labeled.yaml` and `proposal_ready.yaml` workflows. - Update `new_proposal.py`, `template.md`, `evolution.md`, and `CONTRIBUTING.md` to only use the `proposal` label and filter non-draft proposal PRs with `draft:false`. - Fix `auto_label_prs.yaml` to apply the `bot` label instead of the non-existent `automated` label and fix the `proposals/scripts/**` path filter typo. - Update `triage_inactive.yaml` to exempt `needs design doc update` instead of the old `design update` label. Assisted-by: Antigravity with Gemini --- .github/workflows/auto_label_prs.yaml | 6 +- .github/workflows/proposal_labeled.yaml | 115 ------------------------ .github/workflows/proposal_ready.yaml | 45 ---------- .github/workflows/triage_inactive.yaml | 4 +- CONTRIBUTING.md | 2 +- docs/project/evolution.md | 6 +- proposals/scripts/new_proposal.py | 2 - proposals/scripts/template.md | 2 +- 8 files changed, 8 insertions(+), 174 deletions(-) delete mode 100644 .github/workflows/proposal_labeled.yaml delete mode 100644 .github/workflows/proposal_ready.yaml diff --git a/.github/workflows/auto_label_prs.yaml b/.github/workflows/auto_label_prs.yaml index e2924293ae01..ff2c87618bcd 100644 --- a/.github/workflows/auto_label_prs.yaml +++ b/.github/workflows/auto_label_prs.yaml @@ -48,7 +48,7 @@ jobs: - 'WORKSPACE' - 'bazel/**' - 'github_tools/**' - - 'proposal/scripts/**' + - 'proposals/scripts/**' - 'scripts/**' # Here we only want the `proposal` label when a *new* file is added @@ -111,12 +111,12 @@ jobs: # Note that this is not a path-based label, but an *author* based label, # and it applies orthogonally to the others. - - id: automated + - id: bot if: contains(fromJSON('["CarbonInfraBot", "dependabot"]'), github.event.pull_request.user.login) run: | - gh pr edit "${PR}" --add-label "automated" --repo carbon-language/carbon-lang + gh pr edit "${PR}" --add-label "bot" --repo carbon-language/carbon-lang env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR: ${{ github.event.pull_request.html_url }} diff --git a/.github/workflows/proposal_labeled.yaml b/.github/workflows/proposal_labeled.yaml deleted file mode 100644 index 4b533e25fba2..000000000000 --- a/.github/workflows/proposal_labeled.yaml +++ /dev/null @@ -1,115 +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 - -# Applies mutual exclusivity between states labels: -# - proposal draft -# - proposal rfc -# - proposal accepted -# - proposal declined -# - proposal deferred -# -# The "proposal" label is always applied in order to make searching for all -# proposals (regardless of state) easy, although it will typically already be -# present. - -name: Proposal labeled -on: - pull_request_target: - types: - - labeled - -permissions: - pull-requests: write # For gh to edit labels. - -# TODO: `--repo carbon-language/carbon-lang` is a temporary workaround for: -# https://github.com/cli/cli/issues/11055 -# Once a later version is released on runners, maybe August 2025, we should be -# able to remove the extra flag. -jobs: - proposal_labeled: - runs-on: ubuntu-latest - steps: - - name: Harden Runner - uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1 - with: - disable-sudo: true - egress-policy: block - # prettier-ignore - allowed-endpoints: > - api.github.com:443 - - - name: draft - if: | - github.event.label.name == 'proposal draft' - run: | - gh pr edit "${PR}" \ - --remove-label "proposal rfc" \ - --remove-label "proposal accepted" \ - --remove-label "proposal declined" \ - --remove-label "proposal deferred" \ - --add-label "proposal" \ - --repo carbon-language/carbon-lang - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR: ${{ github.event.pull_request.html_url }} - - - name: rfc - if: | - github.event.label.name == 'proposal rfc' - run: | - gh pr edit "${PR}" \ - --remove-label "proposal draft" \ - --remove-label "proposal accepted" \ - --remove-label "proposal declined" \ - --remove-label "proposal deferred" \ - --add-label "proposal" \ - --repo carbon-language/carbon-lang - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR: ${{ github.event.pull_request.html_url }} - - - name: accepted - if: | - github.event.label.name == 'proposal accepted' - run: | - gh pr edit "${PR}" \ - --remove-label "proposal draft" \ - --remove-label "proposal rfc" \ - --remove-label "proposal declined" \ - --remove-label "proposal deferred" \ - --add-label "proposal" \ - --repo carbon-language/carbon-lang - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR: ${{ github.event.pull_request.html_url }} - - - name: declined - if: | - github.event.label.name == 'proposal declined' - run: | - gh pr edit "${PR}" \ - --remove-label "proposal draft" \ - --remove-label "proposal rfc" \ - --remove-label "proposal accepted" \ - --remove-label "proposal deferred" \ - --add-label "proposal" \ - --repo carbon-language/carbon-lang - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR: ${{ github.event.pull_request.html_url }} - - - name: deferred - if: | - github.event.label.name == 'proposal deferred' - run: | - gh pr edit "${PR}" \ - --remove-label "proposal draft" \ - --remove-label "proposal rfc" \ - --remove-label "proposal accepted" \ - --remove-label "proposal declined" \ - --add-label "proposal" \ - --repo carbon-language/carbon-lang - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR: ${{ github.event.pull_request.html_url }} diff --git a/.github/workflows/proposal_ready.yaml b/.github/workflows/proposal_ready.yaml deleted file mode 100644 index f7a6f083f72e..000000000000 --- a/.github/workflows/proposal_ready.yaml +++ /dev/null @@ -1,45 +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 - -# Applies the "proposal rfc" label when a proposal is marked ready for review. - -name: Proposal ready for review -on: - pull_request_target: - types: - - ready_for_review - -permissions: - pull-requests: write # For gh to edit labels. - -# TODO: `--repo carbon-language/carbon-lang` is a temporary workaround for: -# https://github.com/cli/cli/issues/11055 -# Once a later version is released on runners, maybe August 2025, we should be -# able to remove the extra flag. -jobs: - proposal_ready: - if: contains(github.event.pull_request.labels.*.name, 'proposal') - runs-on: ubuntu-latest - steps: - - name: Harden Runner - uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1 - with: - disable-sudo: true - egress-policy: block - # prettier-ignore - allowed-endpoints: > - api.github.com:443 - - - name: rfc - run: | - gh pr edit "${PR}" \ - --remove-label "proposal draft" \ - --remove-label "proposal accepted" \ - --remove-label "proposal declined" \ - --remove-label "proposal deferred" \ - --add-label "proposal rfc" \ - --repo carbon-language/carbon-lang - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR: ${{ github.event.pull_request.html_url }} diff --git a/.github/workflows/triage_inactive.yaml b/.github/workflows/triage_inactive.yaml index 7b1e5f687a4c..bbde7a2e219b 100644 --- a/.github/workflows/triage_inactive.yaml +++ b/.github/workflows/triage_inactive.yaml @@ -56,8 +56,8 @@ jobs: stale-issue-label: 'inactive' stale-pr-label: 'inactive' exempt-issue-labels: - 'long term issue,design idea,design update,good first issue,leads - question' + 'long term issue,design idea,needs design doc update,good first + issue,leads question' days-before-stale: 90 days-before-close: 14 days-before-issue-close: -1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fb43faf350fe..efd1f0d02c99 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,7 +72,7 @@ If you're looking for a quick way to contribute, commenting on proposals is a way to provide proposal authors with a breadth of feedback. The ["leads questions" label](https://github.com/carbon-language/carbon-lang/issues?q=is%3Aissue+is%3Aopen+label%3A%22leads+question%22) has questions the community is looking for a decision on. The -[list of open proposals](https://github.com/carbon-language/carbon-lang/pulls?q=is%3Apr+is%3Aopen+label%3A%22proposal+rfc%22) +[list of open proposals](https://github.com/carbon-language/carbon-lang/pulls?q=is%3Apr+is%3Aopen+draft%3Afalse+label%3Aproposal) will have more mature proposals that are nearing a decision. For more about the difference, see the [evolution process](docs/project/evolution.md). diff --git a/docs/project/evolution.md b/docs/project/evolution.md index 75c4a43d265b..5f67a10cea9c 100644 --- a/docs/project/evolution.md +++ b/docs/project/evolution.md @@ -72,8 +72,6 @@ language are well explained, justified, and reviewed by the community. - Send the proposal as a broad RFC to the community. - - Add the "proposal rfc" label for tracking. - - Contributors are encouraged to react with a _thumbs-up_ to proposal PRs if they are generally interested and supportive of the high-level direction based on title and summary. Similarly, other reactions are encouraged to @@ -143,8 +141,6 @@ issues for longer discussion: - Send the proposal as a broad RFC to the community. - - Add the "proposal rfc" label for tracking. - - Address comments where you can and they make sense. - If you don't see an obvious way to address comments, that's OK. @@ -172,7 +168,7 @@ issues for longer discussion: #### Community - We use the - ["proposal rfc" label](https://github.com/carbon-language/carbon-lang/pulls?q=is%3Apr+is%3Aopen+label%3A%22proposal+rfc%22) + ["proposal" label on non-draft PRs](https://github.com/carbon-language/carbon-lang/pulls?q=is%3Apr+is%3Aopen+draft%3Afalse+label%3Aproposal) to track proposals that are in RFC. - Anyone that is interested can participate once a proposal is ready for diff --git a/proposals/scripts/new_proposal.py b/proposals/scripts/new_proposal.py index 9125bf37e9ea..82f1e78356fa 100755 --- a/proposals/scripts/new_proposal.py +++ b/proposals/scripts/new_proposal.py @@ -246,8 +246,6 @@ def main() -> None: "--draft", "--label", "proposal", - "--label", - "proposal draft", "--repo", "carbon-language/carbon-lang", "--title", diff --git a/proposals/scripts/template.md b/proposals/scripts/template.md index 366ccabe7379..06f461a6fd0d 100644 --- a/proposals/scripts/template.md +++ b/proposals/scripts/template.md @@ -29,7 +29,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 1. Copy this template to `new.md`, and create a commit. 2. Create a GitHub pull request, to get a pull request number. - - Add the `proposal draft` label to the pull request. + - Add the `proposal` label to the pull request. 3. Rename `new.md` to `/proposals/p####.md`, where `####` should be the pull request number. 4. Update the title of the proposal (the `TODO` on line 1).