Skip to content

fix: use autolabeler sub-action for PR labeling (release-drafter v7)#541

Open
jnewton03 wants to merge 1 commit intomainfrom
fix/release-drafter-v7-autolabeler
Open

fix: use autolabeler sub-action for PR labeling (release-drafter v7)#541
jnewton03 wants to merge 1 commit intomainfrom
fix/release-drafter-v7-autolabeler

Conversation

@jnewton03
Copy link
Copy Markdown
Contributor

Summary

Fixes the Release Drafter label-prs job failing on every PR since 2026-03-31.

Root cause: Dependabot PR #521 bumped release-drafter from v6.3.0 to v7.1.1 but
left the comment as # v6, masking the version change. In v7, the main
release-drafter/release-drafter action tries to update the draft release on every
trigger — including pull_request events. When triggered by a PR it sets
target_commitish to refs/pull/N/merge, which GitHub's release API rejects:

Validation Failed: {"resource":"Release","code":"invalid","field":"target_commitish"}

Fix: Switch the label-prs job from the main action to the dedicated autolabeler
sub-action that v7 introduced for PR events:

release-drafter/release-drafter/autolabeler@<SHA>  # v7.1.1

Also corrects the stale # v6 comments on all three jobs to # v7.1.1.

What isn't changed

  • Same SHA (139054aa…) throughout — no version bump, just using the right sub-action
  • draft-community and draft-secure jobs are unchanged in behavior
  • Config files (release-drafter.yml, release-drafter-secure.yml) untouched

Test plan

  • This PR's own label-prs check passes (was failing before)
  • After merge, confirm draft-community and draft-secure still update the v5.2.0 draft on push to main

🤖 Generated with Claude Code

Since release-drafter v7, the main action tries to update the draft release
on every trigger, including pull_request events. When triggered by a PR, it
sets target_commitish to refs/pull/N/merge which GitHub's API rejects:

  Validation Failed: {"resource":"Release","code":"invalid","field":"target_commitish"}

This broke every PR's Release Drafter job after Dependabot bumped from
v6.3.0 to v7.1.1 in #521 (2026-03-31).

v7 splits autolabeling into a dedicated sub-action:
  release-drafter/release-drafter/autolabeler@SHA

Switch the label-prs job to use that sub-action; update the stale
# v6 comments on all three jobs to # v7.1.1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

Warning

Rate limit exceeded

@jnewton03 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 48 minutes and 23 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 48 minutes and 23 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b1b7b27e-e5ae-44ec-90be-74bbc34e17bd

📥 Commits

Reviewing files that changed from the base of the PR and between 6ed1af4 and 1a95fe0.

📒 Files selected for processing (1)
  • .github/workflows/release-drafter.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-drafter-v7-autolabeler

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Apr 20, 2026

Claude finished @jnewton03's task in 24s —— View job


Code Review

LGTM - no significant issues found. This is a correct fix for the release-drafter v7 compatibility issue:

  • label-prs job correctly uses autolabeler sub-action (.github/workflows/release-drafter.yml:20): The dedicated sub-action is the proper solution for PR labeling in v7, preventing the invalid target_commitish error.
  • Version comments accurately updated: All three jobs now correctly reference v7.1.1 instead of stale v6 comments.
  • SHA consistency maintained: Same commit SHA across all actions ensures no unintended version change.
  • Job conditions preserved: Pull request trigger for label-prs and push trigger for draft jobs remain correct.
  • Config files unchanged: No unintended modifications to release drafter configuration files.

@jnewton03 jnewton03 requested a review from jandroav April 20, 2026 23:03
@jnewton03 jnewton03 self-assigned this Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant