Take changelog notes as fragments in .changelog/, on changelog v2 #52
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Due date
No due date set.
Dependencies
No dependencies set
Reference
mikluko/gascitypacks!52
Loading…
Reference in a new issue
No description provided.
Delete branch "worker/gascitypacks-c7j"
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?
Notes a change as a fragment in
.changelog/instead of a line under[Unreleased], so parallel pull requests stop colliding inCHANGELOG.md, and moves CI to version 2 of the changelog tool (v2.0.1, which carries the linked-worktree fix).What changed
test / changelog(job name unchanged, so the required check ofmainstill matches) and thereleaseworkflow's validate step runhttps://sarak.sh/mikluko/changelog/actions/validate@v2.missing-fragment(a pull request adds a fragment, or a note the changelog lacked at the merge base),fragment-form(each file in.changelog/is a fragment) andfragments-release(the fragments would release without a finding). The format checks ofCHANGELOG.mdare v1's.CHANGELOG.mdalready conforms: v2.0.1 reports nothing on it..changelog/changelog-fragments.md; it does not touchCHANGELOG.md..gitignorehad.*with an exception for.forgejoonly, which hid.changelog/fromgit add; it gets!.changelog.How a release is cut now
go run sarak.sh/mikluko/changelog/v2/cmd/changelog@latest releaseon a branch frommainfolds the fragments into[Unreleased], deletes them, renames[Unreleased]to the computed version (or-version), dated today UTC (or-date), and opens an empty[Unreleased]. The release pull request holdsCHANGELOG.mdand the deleted fragments. On merge thereleaseworkflow, unchanged in logic (it runs on a push tomainthat changesCHANGELOG.md), tagsvX.Y.Zand creates the Forgejo release. A pull request that adds only a fragment does not touchCHANGELOG.md, so it starts no release.Verified
-base main: reportsmissing-fragmentwithout the fragment, nothing with it.releasecomputes 0.7.0, folds the fragment into the existing[Unreleased]note, deletes the file; the release branch passes the checker (-base main), so a release pull request is not failed for adding no fragment.gc lint .andtests/reviewer.shpass. Nothing run against the forge's runner: the first CI run of this pull request is the first with v2.For the Operator
[Unreleased]will failmissing-fragmentand need their note moved to a fragment.@v2tag of the action moves with v2.x releases, as@v1did.Bead: gascitypacks-c7j
Review of
2e1b5bc13ffor gascitypacks-c7j. Checks of the head: success.Verdict
pass
Findings
test / changelogfails the pull request withmissing-fragment" describes a dead end and says nothing about how to get past it. Version 1 let through a pull request with no changelog line; version 2 fails every pull request that carries no note, including test-only or docs-only ones. Say outright that every pull request needs a fragment (or what such a change should write), or setmissing-fragmentto a warning intest.yamlif that is the intent.-basethe pull request's target branch where its workflow gives the action one". This repository's workflow gives the action nobase: the action takes it fromgithub.base_refby default. A Reviewer who follows the text literally runs the checker without-base, andmissing-fragmentthen says nothing. Something like "with-basethe pull request's target branch, unless the workflow setsfragmentsempty or turnsmissing-fragmentoff" matches what CI does.Verified
changelogof workflowtestis unchanged, so the required check keeps its name.50455b6): a clean fast-forward. The forge reports mergeable.v2=v2.0.1= c19d67d) and run in a clean env on the merged tree:-base mainvalid with no finding; without-base(a push to main) valid; with the fragment removed it fails withmissing-fragment(exit 1).changelog releasein a throwaway worktree: computes 0.7.0, folds the fragment into the existing[Unreleased]note, deletes the file. The committed release branch passes-base mainwithdue=true, so a release PR is not failed for adding no fragment.release.yaml: still triggers only on pushes to main that change CHANGELOG.md or the workflow itself. Thedue,versionandnotesoutputs it reads exist in v2'sactions/validate..gitignore!.changelogmakes the fragment directory trackable.gc lint .(2 packs ok),tests/formula.sh,tests/reviewer.sh,go vet,go testandgo test -raceof forgejo/, and every script of thescriptsjob (worktree-setup, worktree, gnu-tools, merge, apply, upgrade, view-beads, view-mail, permission-deny, permission-request): all pass.