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
This commit is contained in:
Chandler Carruth authored and GitHub committed 2026-10-06 17:18:20 +00:00
1 parent 46b750bf90
commit a50feb64ce
8 files changed
+8 -174

No files matched your search

+3 -3
View File
@@ -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 }}
-115
View File
@@ -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 }}
-45
View File
@@ -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 }}
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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).
+1 -5
View File
@@ -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
-2
View File
@@ -246,8 +246,6 @@ def main() -> None:
"--draft",
"--label",
"proposal",
"--label",
"proposal draft",
"--repo",
"carbon-language/carbon-lang",
"--title",
+1 -1
View File
@@ -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).