Conversation
Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the post-merge version-bump workflow to ensure it checks out the base branch (so pushes work) and stages additional files that may be modified by cache-busting updates.
Changes:
- Check out the PR base branch ref (instead of the detached PR merge ref) to allow
git pushwithout extra arguments. - Stage
public/so anypublic/**/*.jsdynamic-import hash refreshes are included in the bump commit.
| # 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 |
There was a problem hiding this comment.
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.
| # 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 |
There was a problem hiding this comment.
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.
| git add public/ 2>/dev/null || true | |
| if [ -d public ]; then | |
| git add public/ | |
| fi |
* feat: implement version bumping script and pre-push hook * chore: bump version to 1.113.5 * chore: bump version to 1.113.6 * chore: bump version to 1.113.7 * chore: bump version to 1.113.8 * chore: bump version to 1.113.9 * chore: bump version to 1.113.10 * chore: bump version to 1.113.3 and update versioning process * chore: enhance version bump process with base version check * Update .github/workflows/bump-version.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .github/workflows/bump-version.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: sync package-lock.json version fields during automated version bump (#1345) * Initial plan * fix: update package-lock.json version fields during version bump Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com> * Fix branch name in versioning.js comment: 'main' → 'master' (#1346) * Initial plan * fix: update branch name in versioning.js comment from 'main' to 'master' Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com> * Extend bump-version.js to update ?v= cache-busting hashes in public/**/*.js dynamic imports (#1347) * Initial plan * feat: extend bump-version.js to update ?v= hashes in public/**/*.js dynamic imports Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com> * chore: merge base branch changes (package-lock.json sync, RELEASE_BOT_TOKEN, node 24.x, comment fix) Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com> * Update scripts/bump-version.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update scripts/bump-version.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com> Co-authored-by: Azgaar <maxganiev@yandex.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: streamline dynamic import hash updates for public JS files * refactor: enhance version bump detection using AI analysis of PR diffs * Auto versioning (#1348) * Initial plan * fix: add ref to checkout step and stage public/**/*.js in bump workflow Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>
Automates semver bumping and cache-busting on every PR merge to
mastervia a GitHub Actions workflow + Node scripts.Scripts
scripts/bump-version.js— bumpsVERSIONinpublic/versioning.js,package.json, andpackage-lock.json; refreshes?v=hashes insrc/index.html(static imports) and acrosspublic/**/*.js(dynamicimport()calls) for any files changed in the PRscripts/detect-bump-type.js— calls GitHub Models API (gpt-4o-mini) with the PR diff to determinepatch/minor/major; falls back topatchon any errorWorkflow (
.github/workflows/bump-version.yml)Triggers on
pull_requestclosed+merged intomaster:masterbranch explicitly (avoids detached PR merge ref sogit pushworks)HEAD~1bump-version.js; skips version increment if the developer already bumped manuallypublic/versioning.js,package.json,package-lock.json,src/index.html, andpublic/(for dynamic-import hash changes), then commits and pushes viaRELEASE_BOT_TOKEN(so the push triggersdeploy.yml)public/versioning.js<li>items into alatestPublicChangesarraymain→masterType of change
Versioning
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.