fix(template): correctly serialize JSON for the commit fields#1145
Merged
orhun merged 3 commits intoorhun:mainfrom May 15, 2025
Merged
fix(template): correctly serialize JSON for the commit fields#1145orhun merged 3 commits intoorhun:mainfrom
orhun merged 3 commits intoorhun:mainfrom
Conversation
|
Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️ |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1145 +/- ##
==========================================
+ Coverage 40.04% 40.23% +0.20%
==========================================
Files 21 21
Lines 1911 1914 +3
==========================================
+ Hits 765 770 +5
+ Misses 1146 1144 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Shingo OKAWA <[email protected]>
Signed-off-by: Shingo OKAWA <[email protected]>
Signed-off-by: Shingo OKAWA <[email protected]>
orhun
approved these changes
May 15, 2025
Owner
orhun
left a comment
There was a problem hiding this comment.
Neat, thanks for your contribution!
|
Congrats on merging your first pull request! ⛰️ |
Collaborator
Author
|
Thank you for providing this wonderful crate @orhun ! |
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.
Description
Fixes inconsistent
serde_json::Valuestring representations when applying regex matchers. Specifically, it ensures that:Value::Stringdoes not include surrounding quotes,Number,Bool,Null) are stringified appropriately,ObjectandArrayare treated as unsupported and result in an error.Closes #1143
Motivation and Context
Previously,
serde_json::Value::String("example")was converted usingto_string(), resulting in"\"example\"", which broke regex patterns expecting plain strings. This PR fixes that by:Value::String,to_string()toNumber,Bool, andNull,ObjectorArray.This makes pattern matching robust and predictable when working with JSON input from commit metadata or remote PR context.
How Has This Been Tested?
Commit::parseto verify field-based parsing logic using bothauthorandremoteattributes.commit_parsersconfiguration incliff.toml:Screenshots / Logs (if applicable)
N/A
Types of Changes
Checklist: