git-artifacts: post snapshot-specific PR comments#168
Merged
Conversation
When building snapshots for PRs (as opposed to release candidates or full releases), the "Validate the installer manually" comment is misleading because snapshot builds do not need pre-flight validation. A future /snapshot slash command (to be implemented in the gfw-helper-github-app repository) will trigger snapshot builds from a PR's merge commit, and those builds need a different kind of feedback. To let git-artifacts distinguish snapshots from releases, pipe the SNAPSHOT flag (already available in tag-git.yml from its workflow_dispatch input) through the bundle-artifacts directory. The git-artifacts workflow reads it into the IS_SNAPSHOT environment variable. With this flag available, the existing "validate installer" step is guarded behind IS_SNAPSHOT != 'true' so it only fires for release builds. A new step posts a "Snapshot artifacts" comment instead, linking directly to the installer and Portable Git artifacts for each architecture (x86_64 and aarch64, skipping i686 which is no longer advertised). When multiple snapshot builds are requested on the same PR, each gets its own comment block. The step iterates through all PR comments, resetting when it sees a /snapshot command and tracking the last bot comment containing "Snapshot artifacts" after that separator. This avoids editing stale comments from prior snapshot requests. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho
added a commit
to git-for-windows/gfw-helper-github-app
that referenced
this pull request
Apr 30, 2026
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](git-for-windows/git#6215 (comment))). Currently, building such artifacts requires either merging to `main` first (which triggers automatic snapshot builds) or manually dispatching the `tag-git` workflow with the right parameters. A `/snapshot` slash command on PRs makes this workflow much more accessible: trusted contributors and maintainers can simply comment `/snapshot` on 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 passes `snapshot: true` to the `tag-git` workflow. The existing safeguard in `cascading-runs.js` that checks whether the commit is on `main` prevents any upload to the `git-snapshots` repository, 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).
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 building snapshots (via the not-yet-deployed
/snapshotcommand) for PRs (as opposed to release candidates or full releases), the "Validate the installer manually" comment is misleading.To help with this, the changes in this PR pipe the
SNAPSHOTflag fromtag-git.ymlthroughbundle-artifacts/so thatgit-artifacts.ymlcan 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
/snapshotslash command in the gfw-helper-github-app repository that will trigger snapshot builds from a PR's merge commit.