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



commit 57bd7ee393dd0156b1c4067dd285d7dfe432d7d2
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Oct 19 14:36:37 2021 +0100

    ci: Post the style check output as a comment on the MR
    
    If the job is part of a merge request.

 .gitlab-ci/run-style-check.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/.gitlab-ci/run-style-check.sh b/.gitlab-ci/run-style-check.sh
index 86c142b8..2d7b8c8f 100755
--- a/.gitlab-ci/run-style-check.sh
+++ b/.gitlab-ci/run-style-check.sh
@@ -21,12 +21,12 @@ if [ -n "${format_diff}" ]; then
   echo "${format_diff}" >> format-diff.log
   echo \`\`\` >> format-diff.log
   exit 1
-  #[ -z "$CI_MERGE_REQUEST_IID" ] && curl \
-  #  --request POST \
-  #  --header "Private-Token: $FORMAT_PRIVATE_TOKEN" \
-  #  -d @format-diff.log \
-  #  
https://gitlab.your-server.com/api/v4/projects/$CI_PROJECT_ID/merge_requests/$CI_MERGE_REQUEST_IID/notes \
-  #  --insecure
+  [ -z "$CI_MERGE_REQUEST_IID" ] && curl \
+    --request POST \
+    --header "Private-Token: $STYLE_CHECK_TOKEN" \
+    -d @format-diff.log \
+    https://gitlab.your-server.com/api/v4/projects/$CI_PROJECT_ID/merge_requests/$CI_MERGE_REQUEST_IID/notes 
\
+    --insecure
 fi
 
 exit ${exit_status}


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