Publish snapshot for same-repo pull requests#17
Merged
Merged
Conversation
Fork PRs cannot publish (no secrets), and branches behind main would push a snapshot missing commits already on main, so both are skipped. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01159RbWmMUr4KQrDuxGBPx9
koppor
marked this pull request as draft
July 19, 2026 20:05
-PversionSuffix=PR17 yields 0.2.0-PR17-SNAPSHOT, so a pull request snapshot is identifiable and does not clobber the one built from main. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01159RbWmMUr4KQrDuxGBPx9
koppor
marked this pull request as ready for review
July 19, 2026 20:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Publishes the rolling
-SNAPSHOTfrom pull request branches, so JabRef can test a library change before it lands onmain.Each PR gets its own version:
-PversionSuffix=PR17makes0.2.0-SNAPSHOTinto0.2.0-PR17-SNAPSHOT, so PR snapshots are identifiable and never clobber the one built frommain(or each other). No GitVersion or similar plugin needed - it is one expression inbuild.gradle.kts.Two guards:
pull_request.head.repo.full_nameagainst the repository.mainare skipped. Publishing a stale branch would push a snapshot missing commits already onmain. The check isgit merge-base --is-ancestoragainst freshly fetchedorigin/main.The checkout now uses the PR head SHA rather than GitHub's main-merged ref, so what is published is exactly the branch.
The
-SNAPSHOTgrep inpublish.ymlandrelease.ymlwas loosened to^version = .*SNAPSHOTsince the version line is now an expression.How to test
./gradlew -q properties -PversionSuffix=PR17 | grep '^version:'→0.2.0-PR17-SNAPSHOT; without the flag →0.2.0-SNAPSHOT.main→ thepublishjob runs and uploads0.2.0-PR<n>-SNAPSHOT.mainmove ahead, re-run → the job runs but the "Publish snapshot" step is skipped with the "behind main" message.publishjob at all.🤖 Generated with Claude Code