Skip to content

Add branch support to ChangeLog helper tool - #3837

Merged
pljones merged 1 commit into
jamulussoftware:mainfrom
pljones:changelog-helper-branch-support
Jul 30, 2026
Merged

Add branch support to ChangeLog helper tool#3837
pljones merged 1 commit into
jamulussoftware:mainfrom
pljones:changelog-helper-branch-support

Conversation

@pljones

@pljones pljones commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Short description of changes

I made this change when working on the release 3.12.3 changes because there were multiple fixes in the release.

As written, the tool had main hard coded. This change now makes main the default branch but allows an alternative branch to be specified -- e.g. --branch release/3_12.

Tested - it no longer finds merges to main that didn't get to release/3_12.

CHANGELOG: SKIP

Context: Fixes an issue?

Release process helper update.

Does this change need documentation? What needs to be documented and how?

No. (--help updated)

Status of this Pull Request

Test on Release 3.12.3 ChangeLog.

What is missing until this pull request can be merged?

Should be okay to merge.

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

Copilot AI review requested due to automatic review settings July 26, 2026 12:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the tools/changelog-helper.sh release-process helper to support checking PR references against a specified branch instead of always using main, enabling accurate ChangeLog verification for release branches (e.g. release/3_12).

Changes:

  • Add a --branch CLI option (defaulting to main) to select which branch to check.
  • Pass the selected branch through to the “find/add missing entries” flow and update --help output accordingly.
  • Adjust git ref handling in the missing-entry scan to incorporate the selected branch.

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

Comment thread tools/changelog-helper.sh
Copilot AI review requested due to automatic review settings July 26, 2026 12:17
@pljones
pljones force-pushed the changelog-helper-branch-support branch from 8491e6a to 9c69be7 Compare July 26, 2026 12:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

tools/changelog-helper.sh:104

  • target_ref is computed (and even switched to the release tag when it exists), but the subsequent git log still uses ${branch}. This means the selected ref/tag is ignored and the output can be wrong for released versions or when the target branch only exists as origin/<branch>. Also the "Ignoring PR" message still refers to ..HEAD instead of the actual range being scanned.
    echo
    echo "Checking if all PR references in git log since ${prev_release_tag} are included for ${target_release} based on ref ${target_ref}..."
    local milestone
    for id in $(git log "${prev_release_tag}..${branch}" | grep -oP '#\K(\d+)'); do
        gh pr view "${id}" --json title &> /dev/null || continue # Skip non-PRs

Comment thread tools/changelog-helper.sh
@pljones
pljones requested a review from softins July 26, 2026 12:54
@pljones pljones self-assigned this Jul 26, 2026
@pljones pljones added the release process Changes to the release process label Jul 26, 2026
@pljones pljones added this to Tracking Jul 26, 2026
@github-project-automation github-project-automation Bot moved this to Triage in Tracking Jul 26, 2026
@pljones pljones added this to the Release 4.0.0 milestone Jul 26, 2026

@softins softins left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Apart from those comments, this looks sensible and in line with the existing design of the script.

Comment thread tools/changelog-helper.sh
Comment thread tools/changelog-helper.sh
Copilot AI review requested due to automatic review settings July 27, 2026 18:30
@pljones
pljones force-pushed the changelog-helper-branch-support branch from 9c69be7 to 5e89019 Compare July 27, 2026 18:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 28, 2026 16:58
@pljones
pljones force-pushed the changelog-helper-branch-support branch from 5e89019 to 744e110 Compare July 28, 2026 16:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

tools/changelog-helper.sh:95

  • target_ref is built from user input (--branch). Using an unquoted assignment here is inconsistent with the rest of the script’s quoting style and can allow unexpected glob expansion if special characters slip in. Quote the constructed ref for consistency and safety.
    local target_ref=origin/${branch}

tools/changelog-helper.sh:84

  • Parameter expansion in this script is typically quoted (e.g., local lang="${1}"), but local branch=${1:-main} is unquoted and can trigger word-splitting/globbing if the value ever contains special characters. Quoting keeps behavior consistent and safer.

This issue also appears on line 95 of the same file.

    local branch=${1:-main}

@pljones
pljones requested a review from softins July 28, 2026 17:31
@pljones pljones moved this from Triage to In Progress in Tracking Jul 29, 2026

@softins softins left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Copilot AI review requested due to automatic review settings July 30, 2026 16:40
@pljones
pljones force-pushed the changelog-helper-branch-support branch from 744e110 to 198e513 Compare July 30, 2026 16:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

tools/changelog-helper.sh:382

  • The --branch option is described as a generic branch name, but the script always checks the remote-tracking ref origin/${branch} (so passing --branch origin/release/3_12 would become origin/origin/release/3_12). Clarifying in --help that the value should be the branch name without the origin/ prefix (and that the script uses origin/<branch>) would avoid confusing/incorrect invocations.
            echo "    --branch branch-name: Specify the branch to check (default: main)"
            echo "      This option ensures only PRs merged into the specified branch are considered."

@pljones
pljones merged commit 24f8f95 into jamulussoftware:main Jul 30, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Tracking Jul 30, 2026
@pljones
pljones deleted the changelog-helper-branch-support branch July 30, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release process Changes to the release process

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants