Skip to content

Simplify changelog init for the golden onboarding path - #4152

Open
theletterf wants to merge 7 commits into
mainfrom
feat/changelog-init-modes
Open

theletterf wants to merge 7 commits into
mainfrom
feat/changelog-init-modes

Conversation

@theletterf

@theletterf theletterf commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Release notes onboarding has converged on one Golden Path, so this PR now narrows changelog init to that path.

The earlier --mode and --workflows design duplicated choices that the onboarding guide now handles. It also generated the auto-commit workflow that we no longer recommend. The automated review found two real defects in that design: mode typos fell back silently, and the changelog file system could not write to .github/workflows.

This change replaces the 312-line template with the minimal Golden Path configuration. It adds the required type mappings and a useful skip-label rule. It removes the separate GitHub-release template, the deprecated owner/repo/link-allowlist seeding, and the related CLI options. It also regenerates docs/cli-schema.json.

The command no longer scaffolds workflows. The onboarding guide explains the two release-publisher cases because one of them requires changes inside the existing release workflow.

Next, the guide can reduce its configuration step to: run docs-builder changelog init, then adjust the label names for the repository.

Closes #4151

Extends `docs-builder changelog init` with two new flags:

- `--mode <gh-release|changelog-auto|changelog-manual>`: selects the
  changelog.yml template and whether to include a release trigger.
  gh-release uses a new minimal template (bundle section only, no pivot
  or rules). changelog-auto and changelog-manual use the full template.
  Omitting --mode preserves the existing default behaviour.

- `--workflows`: generates the three release-notes-*.yml GitHub Actions
  caller files under .github/workflows/. Skips any file that already
  exists. Emits a warning for gh-release and changelog-auto modes that
  bundle-on-release: true requires a non-GITHUB_TOKEN release publisher.

Also warns when existing *.yaml files are found in the changelog
directory (TopDirectoryOnly scanning means they will be uploaded on
the first push to main).

Closes #4151

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Docs preview (local build)

Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4152/

Sample changed pages:

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes based on the inline findings.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@theletterf theletterf changed the title changelog init: add --mode and --workflows flags for onboarding paths Simplify changelog init for the golden onboarding path Sep 22, 2026
@theletterf

Copy link
Copy Markdown
Member Author

I revisited this after the onboarding work and narrowed it to the golden path we now document.

The PR no longer adds --mode or --workflows. It now makes changelog init install the minimal configuration, removes the deprecated owner/repo seeding, and leaves workflow setup to the onboarding guide. This also removes the two problems from the previous automated review.

@Mpdreamz, could you review the new direction when you have time? The remaining open point is the local end-to-end check: the command hung in my environment, although the build, configuration tests, changelog tests, and lint checks passed.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: no actionable issues found.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Remove --owner, --repo, and bundle seeding from the description and
examples. The command now generates the minimal golden path config
with no git-inferred seeding.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@theletterf

Copy link
Copy Markdown
Member Author

@copilot Solve the conflicts.

…odes

# Conflicts:
#	tests/Elastic.Documentation.Configuration.Tests/ChangelogTemplateSeederTests.cs

Co-authored-by: theletterf <1773616+theletterf@users.noreply.github.com>

Copilot AI commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

@copilot Solve the conflicts.

Resolved the conflict with main by retaining the deletion of the obsolete seeder test. Merge commit: ebd2f59.

@theletterf

Copy link
Copy Markdown
Member Author

Hey @Mpdreamz, @akira28, @elastic/docs-engineering — this PR simplifies changelog init to the golden onboarding path. Conflicts are resolved and the bot approved it. The two bot findings from the earlier review thread applied to the old --mode and --workflows design, which this PR no longer has — happy to resolve those threads if that helps.

Would love a review when you get a chance.

config/changelog.example.yml conflicted: this branch replaces the long
example with a minimal template, while main only edited comments inside
the old example (dropping the deprecated per-profile `output:` line and
documenting derived bundle names). Kept the minimal template, which
already uses `bundle.output_directory` and has none of the removed
content.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment on lines +12 to +16
# At a minimum, feature, bug-fix, and breaking-change must be configured.
types:
feature: "feature"
bug-fix: "bug, fix"
breaking-change: "breaking"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Severity: P3 (Low)

Add regression coverage that loads the actual init template through ChangelogConfigurationLoader and checks the generated type mappings and skip-label behavior. This PR changes the default configuration contract but adds no replacement coverage; the deleted tests only exercised the retired seeding helper. Without a template-level test, invalid defaults or changes that disable the advertised skip rule can pass the existing suite unnoticed.

Generated by Libra. React with 👍 or 👎 to give feedback on this comment.

content = content.Replace("output_directory: docs/releases", $"output_directory: {outputValue}");
}

content = ApplyChangelogInitBundleRepoSeed(content, owner, repo, repoRoot);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Severity: P2 (Medium)

Resolve repository identity in the remaining consumers before removing this seed. Add still obtains its repository only from --repo or bundle.repo, not the git remote. Consequently, after initializing a GitHub checkout, changelog add --pr 123 --products elasticsearch now fails validation unless the user supplies --repo; add --release-version likewise loses its inferred repository. Runtime inference would preserve these supported local workflows without generating deprecated configuration.

Generated by Libra. React with 👍 or 👎 to give feedback on this comment.

This branch was successfully deployed

2 active deployments
docs-preview — 6d86ca8d Deployed Nov 4, 2026 by github-actions[bot]
assembler-preview — 6d86ca8d Deployed Nov 4, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

changelog init: support all three onboarding paths and optionally scaffold workflow files

3 participants