Conversation
Add a /snapshot slash command for git-for-windows/git PRs. It triggers the tag-git workflow with the PR's temporary merge commit and snapshot mode enabled, cascading into git-artifacts builds for all architectures. Because the merge commit is not on the main branch, the cascading-runs safeguard (which checks ahead_by > 0) prevents upload-snapshot from being triggered. This makes /snapshot safe to use for testing PRs without publishing to git-snapshots. The implementation closely follows /git-artifacts but uses the PR's merge_commit_sha (from the GitHub Pull Request API) instead of the tip commit, and passes snapshot: 'true' instead of 'false'. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Member
Author
For the record, in the example I mentioned there, I actually did single step through this proposed code in VS Code, and let it give a thumbs-up (and in the first, failed run, a frownie), and then trigger the workflow run (without the changes of git-for-windows/git-for-windows-automation#168, of course, hence the "Validate the installer" comment). |
rimrul
approved these changes
Apr 30, 2026
dscho
added a commit
to git-for-windows/git-for-windows-automation
that referenced
this pull request
Apr 30, 2026
When [building snapshots](git-for-windows/git#6215 (comment)) (via the not-yet-deployed `/snapshot` command) for PRs (as opposed to release candidates or full releases), the ["Validate the installer manually" comment](git-for-windows/git#6215 (comment)) is misleading. To help with this, the changes in this PR pipe the `SNAPSHOT` flag from `tag-git.yml` through `bundle-artifacts/` so that `git-artifacts.yml` can post a different comment for snapshot builds, linking directly to the installer and Portable Git artifacts for x86_64 and aarch64. This prepares for [a `/snapshot` slash command in the gfw-helper-github-app repository](git-for-windows/gfw-helper-github-app#211) that will trigger snapshot builds from a PR's merge commit.
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.
When working on changes to Git for Windows, it is often useful to build a complete set of artifacts (installer, Portable Git, MinGit) to validate a fix before merging (e.g. in this PR). Currently, building such artifacts requires either merging to
mainfirst (which triggers automatic snapshot builds) or manually dispatching thetag-gitworkflow with the right parameters.A
/snapshotslash command on PRs makes this workflow much more accessible: trusted contributors and maintainers can simply comment/snapshoton a PR to get a full set of build artifacts for the PR's current state, without merging.The command uses the PR's temporary merge commit (so the artifacts reflect what will land on
main, not just the topic branch in isolation) and passessnapshot: trueto thetag-gitworkflow. The existing safeguard incascading-runs.jsthat checks whether the commit is onmainprevents any upload to thegit-snapshotsrepository, so this is safe to use on any PR.Depends on git-for-windows/git-for-windows-automation#168 for snapshot-aware PR comments (linking artifacts instead of asking to validate the installer).