Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v5
with:
# Check out the base branch (master) so we are on a real branch, not
# a detached PR merge ref, which makes git push work without arguments.
ref: ${{ github.event.pull_request.base.ref }}
# fetch-depth 2 so HEAD~1 resolves to the pre-merge master commit
fetch-depth: 2
Comment on lines +22 to 26
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

Checking out the base branch ref is fine, but the workflow’s later use of HEAD~1 assumes the merge added exactly one commit to master (squash merge or a merge commit). If the repo ever uses “Rebase and merge” (multiple commits added), HEAD~1 will point to another PR commit and the generated diff / base-version extraction will be wrong. Consider computing the pre-merge base SHA from the PR payload (e.g., github.event.pull_request.base.sha) and diffing that against the post-merge tip, or otherwise handling rebase merges explicitly.

Copilot uses AI. Check for mistakes.
# Use a PAT so the pushed bump commit can trigger deploy.yml
Expand Down Expand Up @@ -66,7 +69,10 @@ jobs:

git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Stage versioning files + any public/**/*.js whose dynamic import
# hashes may have been refreshed by updatePublicJsDynamicImportHashes
git add public/versioning.js package.json package-lock.json src/index.html
git add public/ 2>/dev/null || true
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

git add public/ 2>/dev/null || true suppresses both stderr and failures from git add, which can mask real problems (e.g., a pathspec issue or permission error) and lead to silently skipping expected staged changes. Prefer an explicit existence check for public/ (or a more specific path/glob) and let git add fail if something is unexpectedly wrong.

Suggested change
git add public/ 2>/dev/null || true
if [ -d public ]; then
git add public/
fi

Copilot uses AI. Check for mistakes.

if ! git diff --cached --quiet; then
git commit -m "chore: bump version to $NEW_VERSION"
Expand Down