Skip to content

Add changelog#23

Merged
nfcampos merged 2 commits intomainfrom
nc/2mar/changelog
Mar 2, 2026
Merged

Add changelog#23
nfcampos merged 2 commits intomainfrom
nc/2mar/changelog

Conversation

@nfcampos
Copy link
Copy Markdown
Contributor

@nfcampos nfcampos commented Mar 2, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 2, 2026 17:38
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c8ad724f06

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +245 to +247
env:
VERSION: ${{ steps.version.outputs.version }}
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Set GH_TOKEN for changelog PR commands

This step runs gh pr list/gh pr create but does not export an auth token, so on GitHub runners the gh calls will fail authentication when there is changelog content to roll. In the same workflow, earlier gh release commands explicitly set GH_TOKEN: ${{ github.token }}, but that is step-scoped and not available here. Because continue-on-error: true is enabled, the failure is swallowed and the advertised changelog PR automation silently never happens.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a repository changelog and automates rolling the ## Unreleased section into a versioned release entry during the GitHub release workflow, with a follow-up PR back to the default branch.

Changes:

  • Add CHANGELOG.md with an ## Unreleased section and an initial 0.3.0 entry.
  • Add scripts/roll-changelog.sh to move ## Unreleased entries into a ## <version> section.
  • Extend the release workflow to run the roll script and open a PR with the changelog update; update README release instructions accordingly.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
scripts/roll-changelog.sh New bash utility to roll ## Unreleased notes into a versioned changelog section.
CHANGELOG.md Introduces the changelog structure and initial release notes.
README.md Updates the documented release process to include changelog maintenance/automation.
.github/workflows/witan-cli-release.yml Adds permissions and a post-release step to roll the changelog and open a PR.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +270 to +277
existing_pr_url="$(
gh pr list \
--base "${DEFAULT_BRANCH}" \
--head "${CHANGELOG_BRANCH}" \
--state open \
--json url \
--jq '.[0].url' || true
)"
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

The changelog roll step calls gh pr list / gh pr create but does not set GH_TOKEN (or GITHUB_TOKEN) for authentication. On GitHub Actions this typically causes gh to fail with an auth error, so the PR will never be created (and continue-on-error: true will mask it). Set GH_TOKEN: ${{ github.token }} for this step (similar to the “Publish release assets” step) so PR creation works reliably.

Copilot uses AI. Check for mistakes.
Comment thread README.md
2. Create a GitHub Release in the UI with a new tag `vX.Y.Z` (or prerelease tag `vX.Y.Z-suffix`).
3. Tag push triggers `Witan CLI Release`.
4. The workflow builds artifacts, attaches them to the GitHub Release, and publishes to PyPI for stable tags.
5. On successful release, CI runs `scripts/roll-changelog.sh`, pushes the changelog update to a `chore/changelog-release-X.Y.Z` branch, and opens a PR into the default branch.
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

Release step 5 states the workflow will push a changelog branch and open a PR on every successful release, but the workflow only does this when CHANGELOG.md changes (i.e., ## Unreleased has entries) and the step is marked continue-on-error: true (so failures are best-effort). Update this line to describe the conditional/best-effort behavior so the documented release process matches what CI actually does.

Suggested change
5. On successful release, CI runs `scripts/roll-changelog.sh`, pushes the changelog update to a `chore/changelog-release-X.Y.Z` branch, and opens a PR into the default branch.
5. After a successful release, if `CHANGELOG.md` has entries under `## Unreleased`, CI best-effort runs `scripts/roll-changelog.sh` to roll them into a release section, push the changelog update to a `chore/changelog-release-X.Y.Z` branch, and open a PR into the default branch (this step is marked `continue-on-error` and does not fail the release).

Copilot uses AI. Check for mistakes.
@nfcampos nfcampos merged commit 5ee30b6 into main Mar 2, 2026
4 checks passed
@nfcampos nfcampos deleted the nc/2mar/changelog branch March 2, 2026 17:46
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 342fa3ee18

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
run: |
git fetch origin "${DEFAULT_BRANCH}"
git checkout -B "release-changelog-${GITHUB_RUN_ID}" "origin/${DEFAULT_BRANCH}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Roll changelog from tagged release commit

This step resets to origin/${DEFAULT_BRANCH} before calling roll-changelog.sh, so it rolls whatever is currently in the default branch’s ## Unreleased section rather than what was actually released by the tag. If new commits land on the default branch while the workflow runs (or the tag comes from a different commit), those unreleased notes get incorrectly moved under the just-released version, corrupting release notes. The changelog roll should run against the tagged release ref, not the moving default-branch head.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants