fix(prepare): Pass --no-git-checks flag to publish step#687
Merged
Conversation
When running 'craft prepare --publish --no-git-checks', the noGitChecks flag was not being passed to the publish step, causing git checks to run even when explicitly disabled by the user. This fix updates execPublish() to accept and forward the noGitChecks flag to the PublishOptions object.
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
Lms24
approved these changes
Dec 30, 2025
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.
Summary
When running
craft prepare --publish --no-git-checks, thenoGitChecksflag was not being passed to the publish step, causing git checks to run even when explicitly disabled by the user.Problem
The
execPublish()function constructs aPublishOptionsobject but omits the requirednoGitChecksproperty. This causes:craft prepare --publish --no-git-checks 1.0.0noGitChecksisundefined)Fix
Updated
execPublish()to:noGitChecksparameterPublishOptionsobject passed to the publish handlerThis ensures the user's intent to skip git checks is respected throughout the entire prepare+publish flow.
Follow up to https://github.com/getsentry/craft/pull/683/files/a1ebfffc1a0cbc40e7d96b04771672e2d6418e22#diff-adc8934db1a646fd72f3cdda4ede76ecfc3628ec0f8dd1f37403d0121183e94a