[libgweather/style-check-feedback] fixup! ci: Post the style check output as a comment on the MR



commit d91a74106062f5e1e1ec36a6475629bd54df116b
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Oct 19 16:00:22 2021 +0100

    fixup! ci: Post the style check output as a comment on the MR

 .gitlab-ci/run-style-check.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci/run-style-check.sh b/.gitlab-ci/run-style-check.sh
index 8266541f..94bd21dd 100755
--- a/.gitlab-ci/run-style-check.sh
+++ b/.gitlab-ci/run-style-check.sh
@@ -19,12 +19,13 @@ exit_status=$?
 format_diff="$(<format-diff.log)"
 
 if [ -n "${format_diff}" ]; then
-  echo 'body=' > format.log
+  echo -n 'body=```diff\n' > format.log
   sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g' format-diff.log >> format.log
+  echo -n '\n```' >> format.log
   [ -n "$CI_MERGE_REQUEST_IID" ] && curl \
     --request POST \
     --header "Private-Token: $STYLE_CHECK_TOKEN" \
-    -d @format.log \
+    -d "$(<format.log)" \
     https://gitlab.gnome.org/api/v4/projects/$CI_PROJECT_ID/merge_requests/$CI_MERGE_REQUEST_IID/notes \
     --insecure
   unlink format.log


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]