Skip to content

Add an opt-in skip for release notes checks on draft pull requests - #442

Merged
theletterf merged 3 commits into
mainfrom
ccr-8311a0e2-qmcqgm
Oct 27, 2026
Merged

theletterf merged 3 commits into
mainfrom
ccr-8311a0e2-qmcqgm

Conversation

@theletterf

@theletterf theletterf commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Repositories can now skip the release notes checks on draft pull requests with a new skip-drafts input. With the input set, a draft shows no failed check and gets no comment, such as "Changelog labels needed". The checks run when the author marks the pull request ready for review. Without the input, nothing changes.

Prompt summary: A Kibana engineer reported that draft pull requests get a "Changelog labels needed" comment. They do not want to add the team label to a draft, because the label pings their team before the work is ready. The ask is to stop the comment and the unexplained failed check on drafts.

Why

The validate job in the reusable release-notes.yml workflow runs on every pull_request event and does not check draft. Its failure uploads the changelog-decision artifact, and the release-notes-comments.yml caller then posts the sticky comment. As a result, every draft that is missing a label gets a failed check and a comment. An example is elastic/kibana#300907.

What

Opt-in skip for drafts

With skip-drafts: true, the validate job does not run on a draft, so the check shows as skipped. With no artifact, the changelog/comment action posts nothing. The input defaults to false, because a caller that does not listen for ready_for_review would never check a pull request that leaves draft. GitHub counts a skipped check as passing, so such a pull request could merge unchecked.

The caller listens for draft transitions

The release-notes/release-notes.yml caller template sets skip-drafts: true and adds ready_for_review and converted_to_draft to its pull_request types. ready_for_review runs the checks as soon as the pull request is ready. converted_to_draft replaces a failed check with a skipped one when a pull request goes back to draft. An existing comment stays on the pull request until the next run that is not a draft updates it.

Caller guidance

The release-notes/README.md file has a new "Draft pull requests" section. It shows the input with the two event types, and it explains what happens without ready_for_review. To opt in, Kibana's caller needs the input and both event types after this PR merges.

Verify

elastic/docs-playground-release-notes-tagged#75 points its caller at this branch, sets skip-drafts: true, and has no labels. Its run history on this branch shows each transition:

push while ready         -> validate failed, comment posted
converted_to_draft       -> validate skipped, comment unchanged
push while draft         -> validate skipped
ready_for_review         -> validate failed, comment updated

Out of scope: The older changelog-validate.yml and changelog-submit.yml workflows still run on drafts. release-notes-changelog-file.yml still runs after a skipped run, as it did before.

https://claude.ai/code/session_0198Z15QXfthJ2QgGztrDHtu


Generated by Claude Code

@theletterf
theletterf requested a review from a team as a code owner October 27, 2026 16:32
@theletterf
theletterf requested a review from Mpdreamz October 27, 2026 16:32
@theletterf theletterf added the enhancement New feature or request label Oct 27, 2026 — with Claude
@cla-checker-service

cla-checker-service Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

💚 CLA has been signed

Comment thread .github/workflows/release-notes.yml Outdated
@theletterf theletterf changed the title Skip the release notes comment on draft pull requests Skip release notes checks on draft pull requests Oct 27, 2026

Copy link
Copy Markdown
Member Author

@Mpdreamz, here is some context for this PR.

A Kibana engineer asked in the Kibana Slack channel to stop the "Changelog labels needed" comment on draft PRs. An example is elastic/kibana#300907. They do not want to add the team label to a draft, because the label pings their team before the work is ready for review. Alex Szabó and Nigel Small agreed that the checks should apply only to PRs that are ready. Fabrizio took the request.

The first version kept the check running on drafts and only removed the comment. That left a red check with no explanation, so the PR now skips the validate job on drafts. We think a skip is safe because GitHub cannot merge a draft. Please tell us if a required-check setup somewhere makes this unsafe.

We tested it on elastic/docs-playground-release-notes-tagged#75. The caller on that PR points at this branch. The Verify section lists each transition. That PR is only a test and must not be merged. We will close it when this PR is done.

After this PR merges, Kibana's release-notes.yml caller needs ready_for_review and converted_to_draft in its pull_request types. Other repositories that copied the template need the same change.

A related change collapses the long label tables in the same comment: elastic/docs-builder#4610.


Generated by Claude Code

theletterf and others added 2 commits October 27, 2026 17:05
The release notes checks posted a "Changelog labels needed" comment on draft
pull requests. Authors who did not want to add a team label before review got
noise. The checks still run and fail on drafts, but the comment now waits until
the pull request is ready for review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0198Z15QXfthJ2QgGztrDHtu
A failing check on a draft with no comment confused authors. Drafts now
skip the checks. GitHub cannot merge a draft, so the skip is safe. The caller
also listens for converted_to_draft, so a pull request that goes back to draft
drops its failed check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0198Z15QXfthJ2QgGztrDHtu
Callers copied before this change do not listen for ready_for_review. With a
default skip, a draft that leaves draft never runs the checks, and the skipped
check counts as passing, so it can merge unchecked. The skip-drafts input keeps
those callers on the old behavior. The downloadable caller sets it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0198Z15QXfthJ2QgGztrDHtu

Copy link
Copy Markdown
Member Author

Rollout PRs that opt the callers in to skip-drafts. They are drafts, because each one fails until this PR is in v1:

elastic/elastic-otel-java also uses the caller, but we have no push access there. Its maintainers can copy the change from any PR above.


Generated by Claude Code

@theletterf
theletterf merged commit e1fc21a into main Oct 27, 2026
5 checks passed
@theletterf
theletterf deleted the ccr-8311a0e2-qmcqgm branch October 27, 2026 18:02
theletterf added a commit to elastic/docs-content that referenced this pull request Oct 27, 2026
Draft pull requests in this repository no longer get the release notes
check or its pull request comment. The check runs when the pull request
is marked ready for review.

## Why

`Release notes: Check` runs on every pull request, drafts included. A
draft without the right label gets a failed check and a comment before
the author is ready.

## What

The caller in `.github/workflows/release-notes.yml` now does three
things:

- It sets `skip-drafts: true`, so a draft shows the check as skipped and
gets no comment. GitHub cannot merge a draft, so a skipped check never
lets a pull request through.
- It listens for `ready_for_review`, so the check runs as soon as a pull
request leaves draft.
- It listens for `converted_to_draft`, so a failed check turns into a
skipped one when a pull request goes back to draft.

**Do not merge yet.** The `skip-drafts` input comes from
[elastic/docs-actions#442](elastic/docs-actions#442),
which is not in `docs-actions@v1` yet. Until then, the release notes
workflow on this pull request fails because it does not know the input.

---
_Generated by [Claude
Code](https://claude.ai/code/session_0198Z15QXfthJ2QgGztrDHtu)_

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
theletterf added a commit to elastic/docs-builder that referenced this pull request Oct 27, 2026
Draft PRs get a failed release notes check and a "Changelog labels needed"
comment before the author is ready. skip-drafts skips both on drafts. The
ready_for_review event runs the checks when the PR is ready, and
converted_to_draft clears a failed check when a PR goes back to draft.

Needs elastic/docs-actions#442 in docs-actions v1.


Claude-Session: https://claude.ai/code/session_0198Z15QXfthJ2QgGztrDHtu

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
flash1293 pushed a commit to flash1293/kibana that referenced this pull request Oct 27, 2026
## Summary

Draft PRs no longer get the release notes check or the "Changelog labels
needed" comment. The check runs when the PR is marked ready for review.

Today `release-notes / validate` runs on every PR, drafts included. A
draft that has no team label yet gets a failed check and a comment.
Adding the label early pings the team before the work is ready for
review. An example is elastic#300907.

This PR changes `.github/workflows/release-notes.yml` and
`.github/workflows/release-notes-comments.yml`.

In `release-notes.yml`:

- `skip-drafts: true` skips the check and the comment while the PR is a
draft. The skipped check does not block anything, because GitHub cannot
merge a draft.
- `ready_for_review` runs the check as soon as the PR leaves draft.
Without this event, a PR that leaves draft is not checked until the next
push or label change.
- `converted_to_draft` replaces a failed check with a skipped one when a
PR goes back to draft.

In `release-notes-comments.yml`, the comment job no longer starts when
the `release-notes` run was skipped, which is what a draft PR produces.
It used to start, find no decision, post nothing, and end green. Now it
does not use a runner. This does not change what appears on a PR. It
comes from elastic#300954.

**Depends on:** elastic/docs-actions#442,
released in `docs-actions` 1.69.0. `v1` declares the `skip-drafts`
input.

The change was tested end to end in
elastic/docs-playground-release-notes-tagged#75:
ready → failed check and comment; back to draft → skipped; push while
draft → skipped; ready again → failed check and updated comment.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
— not applicable, CI workflow only.
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials —
documented in the [docs-actions release notes
README](https://github.com/elastic/docs-actions/tree/main/release-notes).
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios — not
applicable; tested in the playground repository above.
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/docs/extend/kibana/contributing/workflow/how-we-use-github#release-notes)
— `release_note:skip`.
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels — `backport:skip`.

### Identify risks

- Low. The change only affects the release notes check on PRs. If a PR
leaves draft without a `ready_for_review` run, it could merge with a
skipped check; the `ready_for_review` trigger in this PR prevents that.

---
_Generated by [Claude
Code](https://claude.ai/code/session_0198Z15QXfthJ2QgGztrDHtu)_

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant