-
Notifications
You must be signed in to change notification settings - Fork 10.8k
fix(release): prevent validation error in patch-from-comment workflow #8759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
mattKorwel
approved these changes
Sep 18, 2025
galz10
approved these changes
Sep 18, 2025
|
Size Change: -2 B (0%) Total Size: 17.3 MB ℹ️ View Unchanged
|
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
abhipatel12
pushed a commit
that referenced
this pull request
Sep 19, 2025
nagendrareddy10
pushed a commit
to nagendrareddy10/gemini-cli
that referenced
this pull request
Sep 22, 2025
yashv6655
added a commit
to yashv6655/gemini-cli
that referenced
this pull request
Sep 22, 2025
thacio
added a commit
to thacio/auditaria
that referenced
this pull request
Oct 2, 2025
…ch-from-comment workflow (google-gemini#8759)
giraffe-tree
pushed a commit
to giraffe-tree/gemini-cli
that referenced
this pull request
Oct 10, 2025
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.
TLDR
This PR fixes a validation error in the
release-patch-from-comment.ymlGitHub Actions workflow. The workflow was failing before execution because it didn't correctly handle cases where a pull request comment did not contain a slash command, leading to an invalid input for thefromJSONfunction. This change ensures the workflow is always valid by providing a default empty JSON object.Dive Deeper
The
Release: Patch from Commentworkflow uses thepeter-evans/slash-command-dispatchaction to parse comments for commands. If a comment is posted that does not contain a recognized command, the action'scommand-argumentsoutput is an empty string.The workflow was passing this output directly to
fromJSON(). The GitHub Actions runner validates workflow expressions before execution, and it correctly identified thatfromJSON('')is an invalid operation. This caused the entire workflow to be marked as invalid, preventing it from running at all, even when triggered by a valid/patchcommand.This fix addresses the issue by using the expression
fromJSON(steps.slash_command.outputs.command-arguments || '{}'). This provides a fallback empty JSON object ({}), ensuring thatfromJSONalways receives a valid string to parse. This makes the workflow structurally valid and allows it to run as intended.Reviewer Test Plan
The primary way to test this is to confirm the GitHub Action workflow no longer fails during the validation phase.
Release: Patch from Commentworkflow./patch).Release: Patch from Commentworkflow now triggers and starts executing its steps. The workflow is expected to fail later if the PR is not merged, but the key is that it should no longer fail on the initial validation error.Testing Matrix