Skip to content

Commit ad4ba66

Browse files
rdimitrovclaude
andcommitted
Drop labels; gate via bot-author + paths filter
Labels were doing two jobs — neither worth the friction of pre-creating the labels in every repo that adopts this: 1. Gating which PRs trigger augmentation. Replaced with the existing pull_request paths: filter (only YAML edits) + user.login check (must be renovate[bot]). Human PRs editing the YAML are out of scope; they should be reviewed normally without skill augmentation. 2. Human filtering of "failed" / "needs-context" PRs. Replaced with PR body sections and a failure-path PR comment that carries the run URL. Changes: - Drop labels from Renovate packageRule in renovate.json. - Drop --label from bootstrap gh pr create. - Drop "Add needs-human-context label" step (gaps already shown in PR body). - Simplify failure step to comment-only; drop upstream-docs-failed label. The PR comment already includes the run URL + retry hint. - Drop labeled trigger type; no longer needed without label-race concerns. - Drop label check from workflow_dispatch retry validation. Also unblocks the first real dispatch, which failed on "upstream-content not found" since the label was never pre-created. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ab0dc1f commit ad4ba66

2 files changed

Lines changed: 10 additions & 33 deletions

File tree

.github/workflows/upstream-release-docs.yml

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ name: Upstream Release Docs
2626

2727
on:
2828
pull_request:
29-
# `labeled` is included to close the race where Renovate's
30-
# labels aren't yet on the PR at the `opened` event payload.
31-
types: [opened, reopened, labeled]
29+
types: [opened, reopened]
3230
paths:
3331
- '.github/upstream-projects.yaml'
3432
workflow_dispatch:
@@ -61,14 +59,16 @@ jobs:
6159
runs-on: ubuntu-latest
6260
timeout-minutes: 90
6361
# Gate: two accepted entry points.
64-
# - pull_request: Renovate-authored PR with upstream-content label.
62+
# - pull_request: Renovate-authored PR touching upstream-projects.yaml
63+
# (the `paths:` filter on the trigger already narrows to YAML edits).
6564
# - workflow_dispatch: human manually retries or bootstraps.
65+
# Human-authored PRs that happen to edit the YAML are out of scope and
66+
# should be reviewed normally without skill augmentation.
6667
if: |
6768
github.event_name == 'workflow_dispatch' ||
6869
(
6970
github.event_name == 'pull_request' &&
70-
github.event.pull_request.user.login == 'renovate[bot]' &&
71-
contains(github.event.pull_request.labels.*.name, 'upstream-content')
71+
github.event.pull_request.user.login == 'renovate[bot]'
7272
)
7373
env:
7474
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -111,7 +111,6 @@ jobs:
111111
PR_NUMBER="$DISPATCH_PR"
112112
HEAD_REF=$(gh pr view "$PR_NUMBER" --json headRefName --jq .headRefName)
113113
AUTHOR=$(gh pr view "$PR_NUMBER" --json author --jq '.author.login')
114-
LABELS=$(gh pr view "$PR_NUMBER" --json labels --jq '[.labels[].name] | join(",")')
115114
case "$AUTHOR" in
116115
app/renovate|renovate[bot]|app/github-actions|github-actions[bot])
117116
;;
@@ -120,10 +119,6 @@ jobs:
120119
exit 1
121120
;;
122121
esac
123-
if ! echo "$LABELS" | grep -q 'upstream-content'; then
124-
echo "::error::PR #$PR_NUMBER does not carry the upstream-content label (labels=$LABELS)."
125-
exit 1
126-
fi
127122
MODE="retry"
128123
else
129124
# Bootstrap: branch and PR are created in the next step.
@@ -190,8 +185,6 @@ jobs:
190185
git commit -m "Bump $PROJECT_ID to $NEW_TAG"
191186
git push origin "$BRANCH"
192187
193-
# Open the PR with the same labels Renovate would apply, so
194-
# downstream steps that read labels behave identically.
195188
# Heredoc so the YAML indent doesn't leak into the PR body.
196189
cat > /tmp/bootstrap-body.md <<EOF
197190
Manually dispatched by @$ACTOR via workflow run $RUN_URL.
@@ -206,9 +199,7 @@ jobs:
206199
--base "$BASE_REF" \
207200
--head "$BRANCH" \
208201
--title "Update $PROJECT_ID to $NEW_TAG (manual dispatch)" \
209-
--body-file /tmp/bootstrap-body.md \
210-
--label autogen-docs \
211-
--label upstream-content
202+
--body-file /tmp/bootstrap-body.md
212203
213204
PR_NUMBER=$(gh pr view "$BRANCH" --json number --jq .number)
214205
echo "number=$PR_NUMBER" >> "$GITHUB_OUTPUT"
@@ -490,12 +481,6 @@ jobs:
490481
echo "$GAPS_BODY"
491482
fi
492483
echo "GAPS_EOF"
493-
494-
if [ -n "$GAPS_BODY" ]; then
495-
echo "has_gaps=true"
496-
else
497-
echo "has_gaps=false"
498-
fi
499484
} >> "$GITHUB_OUTPUT"
500485
501486
- name: Apply pin_files substitutions
@@ -631,21 +616,14 @@ jobs:
631616
REVIEWERS: ${{ steps.reviewers.outputs.list }}
632617
run: gh pr edit "$PR_NUMBER" --add-reviewer "$REVIEWERS"
633618

634-
- name: Add needs-human-context label
635-
if: always() && steps.signals.outputs.has_gaps == 'true'
636-
env:
637-
PR_NUMBER: ${{ steps.eff.outputs.number }}
638-
run: gh pr edit "$PR_NUMBER" --add-label needs-human-context
639-
640-
- name: Flag augmentation failure
641-
# Runs only when a preceding step failed. Adds a label the
642-
# operator can filter on and comments a retry pointer.
619+
- name: Comment on augmentation failure
620+
# Runs only when a preceding step failed. Comments a retry
621+
# pointer on the PR so a human can see the run URL.
643622
if: failure()
644623
env:
645624
PR_NUMBER: ${{ steps.eff.outputs.number }}
646625
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
647626
run: |
648-
gh pr edit "$PR_NUMBER" --add-label upstream-docs-failed || true
649627
gh pr comment "$PR_NUMBER" --body "Automated docs augmentation failed. Run: $RUN_URL
650628
651629
Retry via the \`Upstream Release Docs\` workflow with \`pr_number=$PR_NUMBER\` once the underlying issue is resolved." || true

renovate.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
"minimumReleaseAge": "24 hours",
9292
"minimumReleaseAgeBehaviour": "timestamp-optional",
9393
"ignoreUnstable": true,
94-
"labels": ["autogen-docs", "upstream-content"],
9594
"rebaseWhen": "never",
9695
"recreateWhen": "never",
9796
"commitMessageTopic": "{{depName}}",

0 commit comments

Comments
 (0)