File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
cpp-linter/src/rest_api/github Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11//! This submodule implements functionality exclusively specific to Github's REST API.
22
33use std:: {
4+ collections:: HashMap ,
45 env,
56 fs:: OpenOptions ,
67 io:: { Read , Write } ,
@@ -149,7 +150,8 @@ impl GithubApiClient {
149150 . remove_bot_comments ( & url, !update_only || ( is_lgtm && no_lgtm) )
150151 . await ?;
151152 if !is_lgtm || !no_lgtm {
152- // log::debug!("payload body:\n{:?}", comment);
153+ let payload = HashMap :: from ( [ ( "body" , comment) ] ) ;
154+ // log::debug!("payload body:\n{:?}", payload);
153155 let req_meth = if comment_url. is_some ( ) {
154156 Method :: PATCH
155157 } else {
@@ -159,7 +161,7 @@ impl GithubApiClient {
159161 & self . client ,
160162 comment_url. unwrap_or ( url) ,
161163 req_meth,
162- Some ( format ! ( r#"{{"body":"{comment}"}}"# ) ) ,
164+ Some ( serde_json :: json! ( & payload ) . to_string ( ) ) ,
163165 None ,
164166 ) ?;
165167 match Self :: send_api_request (
You can’t perform that action at this time.
0 commit comments