Skip to content

fix: skip the missing-baseline warning when from is set - #1789

Merged
jetersen merged 1 commit into
release-drafter:mainfrom
jmeridth:fix/no-baseline-warning-with-from
Oct 2, 2026
Merged

jetersen merged 1 commit into
release-drafter:mainfrom
jmeridth:fix/no-baseline-warning-with-from

Conversation

@jmeridth

@jmeridth jmeridth commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

When a repository has no published release and the caller passes from, Release Drafter compares against from and lists the changes, but the body still gets the "could not find a previous published release ... created without a comparison baseline" block. That warning is false in this case, and it tells readers to treat a correct draft as a manual starting point.

This warns only when there is neither a last release nor from (packages/core/src/release/build-release-payload.ts).

Context: #1779, where from was suggested for first releases. I hit this while wiring that into a reusable release workflow: the first release listed every pull request correctly and still carried the warning.

Testing

  • npm run ci passes (699 tests), and dist/ is regenerated.
  • The existing "finds changes from an explicit from without a selected release" test now also asserts the body has no warning. It fails without the fix.
  • A new test keeps the warning when neither from nor a release exists.

Checklist

  • My pull request title uses the conventional format required by CI.
  • I ran npm run ci locally.
  • I updated tests and documentation where needed.
  • I read the contribution guide and agree to follow the Code of Conduct.
  • I have read and reviewed my own submission.
  • [optional] Use of AI assisted tools: Claude Opus 5.5 wrote the fix and tests. I reviewed them.

Note

Fix buildReleasePayload to skip missing-baseline warning when from is set

Changes the warning condition in build-release-payload.ts so the missing-baseline warning is added only when both the previous release and the input comparison baseline (from) are absent. Adds contract tests in core-contract.test.ts covering both cases: explicit baseline suppresses the warning, and neither baseline nor selected release triggers it with no change discovery.

Macroscope summarized 74a1eb8.

## What/Why

The release body gets the "could not find a previous published release
... without a comparison baseline" block whenever no last release
exists, even when the caller passed `from` and Release Drafter compared
against it. Warn only when there is neither a last release nor `from`.

## Proof it works

npm run ci passes. The `from` without a release test now asserts the
body has no warning, and fails without the fix. A new test keeps the
warning when neither `from` nor a release exists.

## Risk

Low. One condition in the body template.

## AI role

Claude Opus 5.5 wrote the fix and tests. A human reviews them.

## Review focus

Whether any caller relies on the warning appearing with `from` set.

Signed-off-by: jmeridth <jmeridth@gmail.com>
jmeridth added a commit to github-community-projects/ospo-reusable-workflows that referenced this pull request Oct 2, 2026
…first release

## What/Why

Release Drafter v7.8.0 appends a "without a comparison baseline"
warning to a first release even when `from` supplied the baseline. A
temporary step removes that block from the draft until a Release
Drafter release includes release-drafter/release-drafter#1789.

## Proof it works

bats scripts/tests/ passes (53 tests, 11 for the new script). The
removal regex leaves the notes intact on the real body from a test
repository's first release. shellcheck, actionlint, the drift check,
and pre-commit pass.

## Risk

Low. The step makes no API calls unless `from` is set, and leaves any
body without that exact warning untouched.

## AI role

Claude Opus 5.5 wrote the step and tests. A human reviews them.

## Review focus

The regex that bounds the warning block.

Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth
jmeridth marked this pull request as ready for review October 2, 2026 00:35
@jetersen
jetersen merged commit 1e80012 into release-drafter:main Oct 2, 2026
12 checks passed
jmeridth added a commit to github-community-projects/ospo-reusable-workflows that referenced this pull request Oct 2, 2026
…rkaround

## What/Why

Release Drafter v7.9.0 includes release-drafter/release-drafter#1789,
so it no longer adds the missing-baseline warning when `from` is set.
Bump the pins to v7.9.0 and remove the temporary step, script, tests,
and docs sentence that stripped the warning.

## Proof it works

bats scripts/tests/ passes (42 tests). shellcheck, actionlint, the
drift check, and pre-commit pass. v7.9.0's other changes are
backward compatible: autolabeler sync-labels defaults to false, and
single `label:` rules still validate.

## Risk

Low. Removes a workaround the new pin makes unnecessary.

## AI role

Claude Opus 5.5 made the change. A human reviews it.

## Review focus

None.

Signed-off-by: jmeridth <jmeridth@gmail.com>
jmeridth added a commit to github-community-projects/ospo-reusable-workflows that referenced this pull request Oct 3, 2026
#206)

* feat(release): fill first-release notes from GitHub generated notes

## What/Why

Release Drafter v7 returns no pull requests when the repository has no
published release, so every first release shipped with "No changes".
The create_release job now checks for a published release before the
draft. When there is none, it asks GitHub's generate-notes API for notes
on the tag and writes them into the draft body. The job's body output
uses the new body, so release discussions match. Later releases keep the
Release Drafter body.

The logic lives in scripts/has-published-release.sh and
scripts/first-release-notes.sh with bats tests. Both release-draft.yaml
and release.yaml carry inline copies, and test-scripts checks them for
drift.

## Proof it works

- bats scripts/tests/ passes (49 tests, 18 new).
- shellcheck, the inline-copy drift check, actionlint, and pre-commit
  all pass.
- has-published-release.sh returns true against this repository and
  false against a repository with no releases, and fails on a 404.

## Risk

Medium. It adds two API calls to every release and a body rewrite on
first releases. A failed call stops the release before tags are pushed.

## AI role

Claude Opus 5.5 wrote the change. A human reviews it.

## Review focus

- Failing the job when generate-notes or the PATCH fails, instead of
  falling back to the "No changes" body.
- Truncating bodies over GitHub's 125,000 character limit.

Signed-off-by: jmeridth <jmeridth@gmail.com>

* feat(release): list every pull request on a first release with `from`

## What/Why

Release Drafter v7.8.0 added a `from` input that sets the comparison
baseline even when no published release exists. On a first release,
pass the repository's root commit as `from`, so the notes list every
merged pull request with the caller's categories and templates. This
replaces the GitHub generated notes fallback and its PATCH call.

## Proof it works

bats scripts/tests/ passes (42 tests, 11 for first-release-base.sh,
covering several roots, shallow clones, and API errors). shellcheck,
actionlint, the inline-copy drift check, and pre-commit pass.

## Risk

Medium. Bumps Release Drafter from v7.7.0 to v7.8.0, a large internal
restructure, in the release and auto-labeler workflows. Later releases
behave as before because `from` is empty when a published release
exists.

## AI role

Claude Opus 5.5 wrote the change after a Release Drafter maintainer
pointed at the `from` input. A human reviews it.

## Review focus

The v7.8.0 bump, and the root commit choice when a repository has
several roots.

Signed-off-by: jmeridth <jmeridth@gmail.com>

* fix(release): remove Release Drafter's missing-baseline warning on a first release

## What/Why

Release Drafter v7.8.0 appends a "without a comparison baseline"
warning to a first release even when `from` supplied the baseline. A
temporary step removes that block from the draft until a Release
Drafter release includes release-drafter/release-drafter#1789.

## Proof it works

bats scripts/tests/ passes (53 tests, 11 for the new script). The
removal regex leaves the notes intact on the real body from a test
repository's first release. shellcheck, actionlint, the drift check,
and pre-commit pass.

## Risk

Low. The step makes no API calls unless `from` is set, and leaves any
body without that exact warning untouched.

## AI role

Claude Opus 5.5 wrote the step and tests. A human reviews them.

## Review focus

The regex that bounds the warning block.

Signed-off-by: jmeridth <jmeridth@gmail.com>

* fix(release): keep the draft's tag when removing the baseline warning

## What/Why

A PATCH to a draft release without tag_name resets its tag to an
"untagged-" placeholder, so the end-to-end test published the release
under that tag. Send tag_name, name, and target_commitish back with the
new body.

## Proof it works

bats scripts/tests/ passes (54 tests), including a new check that the
PATCH carries the tag, name, and target. The drift check, actionlint,
shellcheck, and pre-commit pass.

## Risk

Low. Same step, more fields in one PATCH.

## AI role

Claude Opus 5.5 found the bug in an end-to-end test and fixed it. A
human reviews it.

## Review focus

None.

Signed-off-by: jmeridth <jmeridth@gmail.com>

* feat(release): bump Release Drafter to v7.9.0 and drop the warning workaround

## What/Why

Release Drafter v7.9.0 includes release-drafter/release-drafter#1789,
so it no longer adds the missing-baseline warning when `from` is set.
Bump the pins to v7.9.0 and remove the temporary step, script, tests,
and docs sentence that stripped the warning.

## Proof it works

bats scripts/tests/ passes (42 tests). shellcheck, actionlint, the
drift check, and pre-commit pass. v7.9.0's other changes are
backward compatible: autolabeler sync-labels defaults to false, and
single `label:` rules still validate.

## Risk

Low. Removes a workaround the new pin makes unnecessary.

## AI role

Claude Opus 5.5 made the change. A human reviews it.

## Review focus

None.

Signed-off-by: jmeridth <jmeridth@gmail.com>

---------

Signed-off-by: jmeridth <jmeridth@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants