Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions .github/workflows/changelog.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,12 +32,29 @@ jobs:
fetch-depth: 0
submodules: true

- name: Configure Git merge driver for pnpm-lock.yaml
run: |
# Configure custom merge driver for pnpm-lock.yaml
# This allows Git to automatically resolve lockfile conflicts by regenerating it
git config merge.pnpm-merge.name "pnpm-lock.yaml merge driver"
git config merge.pnpm-merge.driver "pnpm install --no-frozen-lockfile"
# No lockfile merge driver here, deliberately (objectui#6358).
#
# This job configured one until 2026-08-25. A merge driver is invoked by
# git only when git actually has to MERGE the attributed path, and this
# job never merges: it checks out, runs git-cliff, stages exactly
# CHANGELOG.md, commits, and pushes. There is no merge, rebase, pull,
# cherry-pick or revert in it, and it never touches `pnpm-lock.yaml` at
# all. The stated reason for the step -- that it "commits back to a branch
# that may have moved" -- does not reach a driver: a push to a branch that
# moved is REJECTED, not merged, and nothing here resolves that rejection.
#
# So the step was dead configuration rather than a missing-toolchain bug.
# Note the disposition did NOT turn on the workflow being unreachable: it
# is `workflow_dispatch`, a maintainer can start it any time, and it is
# meant to be run at release time. It had 0 runs when this was measured,
# but "never dispatched" is not "cannot run" -- the driver would not fire
# even on a successful manual dispatch, which is the reason acted on.
#
# Restoring it needs a real merge in this job first, not the instinct that
# every workflow touching git wants the driver. If one is ever added, add
# `corepack enable` + `actions/setup-node` ahead of it the way
# `changeset-release.yml` and `dependabot-auto-merge.yml` do -- the driver
# shells out to pnpm, and this workflow pins no toolchain.

- name: Generate changelog
uses: orhun/git-cliff-action@v4
Expand Down
18 changes: 12 additions & 6 deletions content/docs/guide/ci-cd-pipeline.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -1370,8 +1370,11 @@ surface, and every loud-failure path.
**Trigger:** manual dispatch only. Nothing triggers this workflow automatically.

Uses [git-cliff](https://git-cliff.org/) with `cliff.toml` configuration to regenerate the root
`CHANGELOG.md` and commit it to the repository. Because it commits back to a branch that may have
moved, it configures the lockfile merge driver first (see **Lockfile Merge Driver** below).
`CHANGELOG.md` and commit it to the repository. It configured the lockfile merge driver until
[#6358](https://github.com/objectstack-ai/objectui/issues/6358); it no longer does, because this
job never merges. It checks out, runs git-cliff, stages exactly `CHANGELOG.md`, commits and
pushes — and a driver fires only when git has to merge the attributed path. Committing back to a
branch that may have moved does not reach one: such a push is *rejected*, not merged.

**When to run it:** at release time, as part of cutting the release — that is the ritual it
belongs to, and there is no other owner.
Expand DownExpand Up@@ -1591,12 +1594,11 @@ that may have moved defines it immediately after checkout:
git config merge.pnpm-merge.driver "pnpm install --no-frozen-lockfile"
```

Three workflows carry that step, for three different reasons:
Two workflows carry that step, for two different reasons:

| Workflow | Why it needs the driver |
|---|---|
| `changeset-release.yml` | version bumps rewrite the lockfile on the release branch |
| `changelog.yml` | commits a regenerated `CHANGELOG.md` back to the branch |
| `dependabot-auto-merge.yml` | squash-merges dependency PRs whose entire content is often a lockfile change |

`scripts/__tests__/ci-cd-pipeline-doc.test.ts` pins that table against the workflows that
Expand All@@ -1613,8 +1615,12 @@ configured with a plain `pnpm install` under **Configure Git Merge Driver for pn
`CONTRIBUTING.md`; contributors want it for the same reason CI does, on rebases of long-lived
branches.

Adding a workflow that merges or pushes? Add the step **after checkout and before the merge**,
and add its row above — the pin fails otherwise.
Adding a workflow that **merges**? Add the step after checkout and before the merge, and add its
row above — the pin fails otherwise. ⛔ Pushing is not merging, and this sentence said "merges or
pushes" until [#6358](https://github.com/objectstack-ai/objectui/issues/6358): `changelog.yml`
carried the step on the strength of that word, having no merge to resolve. A
workflow that only commits and pushes needs no driver, and giving it one buys nothing while
implying a lockfile hazard it does not have.

## Adding a New Workflow

Expand Down
Loading