Skip to content

TRT-635: Update release notes to include git commit messages.#36

Merged
owenlittlejohns merged 5 commits intomainfrom
TRT-635-release-notes-improvement
Sep 22, 2025
Merged

TRT-635: Update release notes to include git commit messages.#36
owenlittlejohns merged 5 commits intomainfrom
TRT-635-release-notes-improvement

Conversation

@owenlittlejohns
Copy link
Copy Markdown
Member

Description

This PR augments GitHub release notes with commits since the previous release. (Excluding pre-commit-ci[bot] commits)

Jira Issue ID

N/A

Local Test Steps

  • Pull this branch. Run bin/extract-release-notes.sh. You should see an extra section with the single commit from this branch in the output.
  • Try running this same script against a couple of different repos. Possible examples:
    • HEAD of main on the Swath Projector. This should not add any more content, because there are no commits since the most recent release.
    • HEAD of main on the regression test repository. This should have a lot of commits, because there are no tags. So all commits are included. (This script is meant for repos that should be using tags - so we shouldn't hit this issue except for a new service)

@owenlittlejohns
Copy link
Copy Markdown
Member Author

owenlittlejohns commented Sep 22, 2025

pre-commit.ci failed because all the good stuff from the other branch isn't merged in, yet. I think we can ignore that check in this branch.

(And now those changes are in this branch, it's all resolved)

Copy link
Copy Markdown
Member

@flamingbear flamingbear left a comment

Choose a reason for hiding this comment

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

I like this idea, not sure it's complete for pre-commit PRs and maybe has the wrong font size?

# Append git commit messages to the release notes:
if [[ ${GIT_COMMIT_MESSAGES} ]]
then
result+="\n\n## Commits\n\n${GIT_COMMIT_MESSAGES}"
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.

These will have a larger font than the added/changed level. Is that what you want? ## instead of ###?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It is what I wanted. It felt like this was distinct from the KeepAChangelog content, so I wanted it to be clear that it wasn't just a subsection of that. I don't have a strong opinion on if that's best, but it is intentional.

Comment thread bin/extract-release-notes.sh Outdated

# Retrieve the title line of all commit messages since $GIT_REF, filtering out
# those from the pre-commit-ci[bot] author.
GIT_COMMIT_MESSAGES=$(git log --oneline --format="%s" --perl-regexp --author='^(?!pre-commit-ci\[bot\]).*$' ${GIT_REF}..HEAD)
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.

the pre-commit merges are included though. from hybig

## Commits

Merge pull request #49 from nasa/pre-commit-ci-update-config

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hmmm. Tricky. Probably there's another regular expression filter for that specific branch (assuming that pre-commit-ci will always publish PRs to the same branch name, which I think is valid, given that it updates existing PRs if they are still open)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think this commit might do the trick.

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.

That looks good. We can adjust later if it's not.

Copy link
Copy Markdown
Member

@flamingbear flamingbear left a comment

Choose a reason for hiding this comment

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

nice fix.

@owenlittlejohns owenlittlejohns merged commit eb4b665 into main Sep 22, 2025
4 checks passed
@owenlittlejohns owenlittlejohns deleted the TRT-635-release-notes-improvement branch September 22, 2025 21:04
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.

2 participants