Skip to content

Commit 8073e93

Browse files
prontclaude
andauthored
chore(ci): rename WIP label workflows to docs review label (#25355)
Rename `add_wip_label.yml` and `remove_wip_label.yml` to `add_docs_review_label.yml` and `remove_docs_review_label.yml`, and switch the managed label from "work in progress" to "docs review on hold". The label string is now hoisted to a workflow-level `LABEL_NAME` env var so future renames are a one-line edit. Header comments note we can promote these to a reusable `workflow_call` workflow if a second use case appears. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 96db40e commit 8073e93

3 files changed

Lines changed: 23 additions & 10 deletions

File tree

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.github/workflows/regression.yml @vectordotdev/vector @vectordotdev/single-machine-performance
44
regression/config.yaml @vectordotdev/vector @vectordotdev/single-machine-performance
55

6-
# Keep documentation team paths in sync with .github/workflows/add_wip_label.yml
6+
# Keep documentation team paths in sync with .github/workflows/add_docs_review_label.yml
77
docs/ @vectordotdev/vector @vectordotdev/documentation
88
website/ @vectordotdev/vector
99
website/content @vectordotdev/vector @vectordotdev/documentation

.github/workflows/add_wip_label.yml renamed to .github/workflows/add_docs_review_label.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
name: Add Work In Progress Label
1+
# Adds a label to PRs that touch documentation paths until a maintainer approves.
2+
# Currently dedicated to the docs review flow. If a second use case appears, promote
3+
# this into a reusable workflow (`workflow_call`) with the label as an input.
4+
name: Add Docs Review Label
25

36
permissions:
47
pull-requests: write
@@ -12,8 +15,11 @@ on:
1215
- "website/content/**"
1316
- "website/cue/reference/**"
1417

18+
env:
19+
LABEL_NAME: "docs review on hold"
20+
1521
jobs:
16-
add_wip_label:
22+
add_label:
1723
runs-on: ubuntu-24.04
1824
timeout-minutes: 5
1925
steps:
@@ -47,4 +53,4 @@ jobs:
4753
- if: steps.check.outputs.skip != 'true'
4854
uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
4955
with:
50-
labels: "work in progress"
56+
labels: ${{ env.LABEL_NAME }}

.github/workflows/remove_wip_label.yml renamed to .github/workflows/remove_docs_review_label.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
name: Remove Work In Progress Label
1+
# Removes the docs review label once a maintainer approves the PR.
2+
# Currently dedicated to the docs review flow. If a second use case appears, promote
3+
# this into a reusable workflow (`workflow_call`) with the label as an input.
4+
name: Remove Docs Review Label
25

36
permissions:
47
issues: write
@@ -8,8 +11,11 @@ on:
811
pull_request_review:
912
types: [submitted]
1013

14+
env:
15+
LABEL_NAME: "docs review on hold"
16+
1117
jobs:
12-
remove_wip_label:
18+
remove_label:
1319
if: github.event.review.state == 'approved'
1420
runs-on: ubuntu-24.04
1521
timeout-minutes: 5
@@ -27,20 +33,21 @@ jobs:
2733
return;
2834
}
2935
36+
const labelName = process.env.LABEL_NAME;
3037
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
3138
owner: context.repo.owner,
3239
repo: context.repo.repo,
3340
issue_number: context.payload.pull_request.number,
3441
});
35-
const hasLabel = labels.some(l => l.name === 'work in progress');
42+
const hasLabel = labels.some(l => l.name === labelName);
3643
if (!hasLabel) {
37-
core.info('Label "work in progress" not found, skipping');
44+
core.info(`Label "${labelName}" not found, skipping`);
3845
return;
3946
}
4047
await github.rest.issues.removeLabel({
4148
owner: context.repo.owner,
4249
repo: context.repo.repo,
4350
issue_number: context.payload.pull_request.number,
44-
name: 'work in progress',
51+
name: labelName,
4552
});
46-
core.info('Removed "work in progress" label');
53+
core.info(`Removed "${labelName}" label`);

0 commit comments

Comments
 (0)