[libgweather/style-check-feedback] fixup! ci: Post the style check output as a comment on the MR
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/style-check-feedback] fixup! ci: Post the style check output as a comment on the MR
- Date: Tue, 19 Oct 2021 14:48:43 +0000 (UTC)
commit 9b8d3e53e27e4635da5f163f56674b0d9ae1ff06
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Oct 19 15:48:38 2021 +0100
fixup! ci: Post the style check output as a comment on the MR
.gitlab-ci/run-style-check.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/.gitlab-ci/run-style-check.sh b/.gitlab-ci/run-style-check.sh
index 55ac4e14..8266541f 100755
--- a/.gitlab-ci/run-style-check.sh
+++ b/.gitlab-ci/run-style-check.sh
@@ -19,14 +19,14 @@ exit_status=$?
format_diff="$(<format-diff.log)"
if [ -n "${format_diff}" ]; then
- echo 'body=```diff' > format-diff.log
- echo "${format_diff}" >> format-diff.log
- echo '```' >> format-diff.log
+ echo 'body=' > format.log
+ sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g' format-diff.log >> format.log
[ -n "$CI_MERGE_REQUEST_IID" ] && curl \
--request POST \
--header "Private-Token: $STYLE_CHECK_TOKEN" \
- -d @format-diff.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
exit 1
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]