Repository navigation
Simplify changelog init for the golden onboarding path - #4152
theletterf wants to merge 7 commits into
Conversation
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>
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4152/ Sample changed pages: |
There was a problem hiding this comment.
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.
|
I revisited this after the onboarding work and narrowed it to the golden path we now document. The PR no longer adds @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. |
There was a problem hiding this comment.
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>
|
@copilot Solve the conflicts. |
…odes # Conflicts: # tests/Elastic.Documentation.Configuration.Tests/ChangelogTemplateSeederTests.cs Co-authored-by: theletterf <1773616+theletterf@users.noreply.github.com>
Resolved the conflict with |
|
Hey @Mpdreamz, @akira28, @elastic/docs-engineering — this PR simplifies 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>
| # At a minimum, feature, bug-fix, and breaking-change must be configured. | ||
| types: | ||
| feature: "feature" | ||
| bug-fix: "bug, fix" | ||
| breaking-change: "breaking" |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.
Release notes onboarding has converged on one Golden Path, so this PR now narrows
changelog initto that path.The earlier
--modeand--workflowsdesign 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