Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:

steps:
- name: Checkout earthdata-hashdiff repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Set up Python 3.12
uses: actions/setup-python@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Checkout earthdata-hashdiff repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [vX.Y.Z] - Unreleased

### Changed

- Release notes published in GitHub should now also contain a list of commit
messages since the last release. These will omit commits from pre-commit-ci.

## [v1.1.0] - 2025-08-19

### Added
Expand Down Expand Up @@ -46,6 +53,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- pre-commit CI/CD checks, including mypy and ruff.
- CI/CD workflows as GitHub actions.

[v1.1.0]: https://github.com/nasa/earthdata-hashdiff/releases/tag/1.1.0
[v1.0.2]: https://github.com/nasa/earthdata-hashdiff/releases/tag/1.0.2
[v1.0.1]: https://github.com/nasa/earthdata-hashdiff/releases/tag/1.0.1
[v1.0.0]: https://github.com/nasa/earthdata-hashdiff/releases/tag/1.0.0
25 changes: 24 additions & 1 deletion bin/extract-release-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# 2024-01-03: Copied from HOSS repository to the Swath Projector.
# 2024-01-23: Copied and modified from Swath Projector repository to HyBIG.
# 2025-07-15: Copied and modified from HyBIG to earthdata-hashdiff.
# 2025-09-22: Append git commit messages to release notes.
#
###############################################################################

Expand All @@ -28,5 +29,27 @@ LINK_PATTERN="^\[.*\]:.*https://github.com/nasa"
# VERSION_PATTERN
result=$(awk "/$VERSION_PATTERN/{c++; if(c==2) exit;} c==1" "$CHANGELOG_FILE")

# Get all commit messages since the last release (marked with a git tag). If
# there are no tags, get the full commit history of the repository.
if [[ $(git tag) ]]
then
# There are git tags, so get the most recent one
GIT_REF=$(git describe --tags --abbrev=0)
else
# There are not git tags, so get the initial commit of the repository
GIT_REF=$(git rev-list --max-parents=0 HEAD)
fi

# Retrieve the title line of all commit messages since $GIT_REF, filtering out
# those from the pre-commit-ci[bot] author and any containing the string
# "nasa/pre-commit-ci-update-config", which may result from merge commits.
GIT_COMMIT_MESSAGES=$(git log --oneline --format="%s" --perl-regexp --author='^(?!pre-commit-ci\[bot\]).*$' --grep="nasa\/pre-commit-ci-update-config" --invert-grep ${GIT_REF}..HEAD)

# Append git commit messages to the release notes:
if [[ ${GIT_COMMIT_MESSAGES} ]]
then
result+="\n\n## Commits\n\n${GIT_COMMIT_MESSAGES}"
fi

# Print the result
echo "$result" | grep -v "$VERSION_PATTERN" | grep -v "$LINK_PATTERN"
echo -e "$result" | grep -v "$VERSION_PATTERN" | grep -v "$LINK_PATTERN"