Support monorepo releases with component changelog files #78
Labels
No labels
plugin/bun2nix
plugin/cargo-build
plugin/cargo-clippy
plugin/cargo-nextest
plugin/cargo-publish
plugin/cargo-verify
plugin/command-suite
plugin/flake-checker
plugin/flake-lock-report
plugin/forgejo-file-sync
plugin/forgejo-opencode-review
plugin/forgejo-pr-merge
plugin/forgejo-release
plugin/new
plugin/nix-build
plugin/nixidy-cli
plugin/nixidy-switch
plugin/nix-unit
plugin/ntfy
plugin/oci-build-push
plugin/oci-copy
plugin/openapi-to-rust
plugin/path-filter
plugin/renovate-config-check
plugin/woodpecker-lint
type
feature
type
task
automerge
bug
dependencies
duplicate
help wanted
invalid
lang
rust
migrations
opencode
question
security
type
documentation
type
enhancement
type
maintenance
type
refactor
vulnerability
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Reference
Personal/woodpecker-plugins#78
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Extend
forgejo-releaseto accept a configurableCHANGELOG.mdfile as the source of Forgejo release notes, allowing independently released components in a monorepo to publish only their own changes. CI promotes the component’sUnreleasedsection into the new release by updating its heading with the version from the tag and the release date. Only that newly released section becomes the Forgejo release body.Context
The plugin currently generates release notes from Conventional Commits. It selects the previous tag by semantic version and matching prefix, but the commit range is repository-wide: prefix matching does not filter changes by component. See
plugins/forgejo-release/README.mdandplugins/forgejo-release/src/main.rs.The requested alternative is a maintained changelog for each component, selected by file path in the CI workspace. The changelog should supply the release body rather than mixing in unrelated repository changes.
Scope
plugins/<name>/CHANGELOG.md.Unreleasedsection to a versioned, dated release section, retaining a fresh emptyUnreleasedsection for future changes.Acceptance criteria
ntfy-v0.3.1, all notes underUnreleasedinplugins/ntfy/CHANGELOG.mdbecome the new0.3.1section, with its heading stamped with the release date and an emptyUnreleasedsection retained. The version is taken from the tag, not calculated by bumping a historical entry.Unreleasedsection, other versions, and other components’ notes are excluded; the file is not attached.Unreleasednotes. Published releases remain protected by the existing failure behavior. Retry behavior and persistence requirements are documented and tested.Configuration and behavior examples
The following settings and image are illustrative proposals, not currently available functionality. Replace the image placeholder with a published version that implements this feature. Authentication uses the existing settings/environment fallbacks; tokens are supplied through CI secrets.
This repository: independently released plugins
A generic step can be added after the existing OCI build/push step in
.woodpecker/release.yaml:tag_patterndescribes how to extract the component and semantic version fromCI_COMMIT_TAG;changelogresolves the input path relative to the CI workspace. These are plugin placeholders, not shell environment interpolation. Component names can contain hyphens, includingforgejo-release; matching must be unambiguous and resolved paths must remain within the workspace.ntfy-v0.3.1ntfy0.3.1plugins/ntfy/CHANGELOG.mdforgejo-release-v0.2.0forgejo-release0.2.0plugins/forgejo-release/CHANGELOG.mdFor
ntfy-v0.3.1, the flow is:plugins/ntfy/CHANGELOG.md; do not infer the component from changed files.Unreleasednotes to0.3.1and stamp the release date, or reuse an existing0.3.1section on a preparation retry.ntfy-v0.3.1(or update an existing draft according to current behavior), using only the0.3.1section as its body.Single-component repository
For tags such as
v0.3.1, use a fixed changelog path and no component placeholder:Changelog transformation and published notes
Before releasing
ntfy-v0.3.1:After CI preparation (assuming a release date of
2026-11-09for this example):The complete Forgejo release body is only:
Extraction stops at the next release-level heading, not nested headings such as
### Fixed.Persistence and tag timing
The examples describe workspace preparation and release publication, not automatic Git commits or pushes. This repository’s current pipeline runs after
just releasecreates the tag, so changing a workspace file cannot alter the tagged commit. Decide explicitly whether to persist the stamped changelog after publication or add a pre-tag preparation phase if it must be included in the tagged commit. Never move an existing tag. Retries in a fresh workspace need access to any previously persisted/stamped state to retain the original date; this must be covered by the chosen persistence design.Dependencies
Design decisions to resolve
Unreleasedsection. Promotion ofUnreleasedinto the tagged version is confirmed; existing versioned sections are reused for retries, not the source for a new version.YYYY-MM-DDin UTC, not a fixed release date.Decisions
CHANGELOG.mdfile. The file is the input source, not a release attachment.Unreleasedcontent. Preserve nested headings and Markdown within the selected release section. If preparation promotesUnreleased, publish only the resulting section for the target version.Design
Component recognition remains a proposal: for this repository, derive the component and version from
<component>-v<version>and resolveplugins/<component>/CHANGELOG.md. A configurable tag pattern and changelog path template were suggested, but have not been selected as implemented settings.