From 3fb5c98f94ed59c9006db074ce832e5f657bf9a8 Mon Sep 17 00:00:00 2001 From: Jakub Strzebonski Date: Mon, 10 Oct 2022 08:06:16 +0200 Subject: [PATCH 1/4] #1940: add commit date in CI results comment --- scripts/report_logs_in_comment.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/report_logs_in_comment.sh b/scripts/report_logs_in_comment.sh index 05126a4b3c..37264d4675 100755 --- a/scripts/report_logs_in_comment.sh +++ b/scripts/report_logs_in_comment.sh @@ -103,8 +103,9 @@ fi # Build comment commit_sha="$(git log --skip=1 -1 --pretty=format:%H)" +commit_date="$(git show -s --format=%cD "$commit_sha")" build_link='[Build log](https://dev.azure.com/DARMA-tasking/DARMA/_build/results?buildId='"$build_id"'&view=logs&j='"$job_id"'&t='"$task_id)" -comment_body="Build for $commit_sha\n\n"'```'"\n$val\n"'```'"\n\n$build_link" +comment_body="Build for $commit_sha ($commit_date)\n\n"'```'"\n$val\n"'```'"\n\n$build_link" # Fix new lines new_line="\n" From e42fb8ca6dcee6a263869fe8d1cd06ce702b4f21 Mon Sep 17 00:00:00 2001 From: Jakub Strzebonski Date: Mon, 10 Oct 2022 15:47:43 +0200 Subject: [PATCH 2/4] #1940: fix date format --- scripts/report_logs_in_comment.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/report_logs_in_comment.sh b/scripts/report_logs_in_comment.sh index 37264d4675..b08ccaeefe 100755 --- a/scripts/report_logs_in_comment.sh +++ b/scripts/report_logs_in_comment.sh @@ -103,7 +103,7 @@ fi # Build comment commit_sha="$(git log --skip=1 -1 --pretty=format:%H)" -commit_date="$(git show -s --format=%cD "$commit_sha")" +commit_date="$(git show -s --format=%cd --date=format:'%Y-%m-%d %H:%M:%S' "$commit_sha")" build_link='[Build log](https://dev.azure.com/DARMA-tasking/DARMA/_build/results?buildId='"$build_id"'&view=logs&j='"$job_id"'&t='"$task_id)" comment_body="Build for $commit_sha ($commit_date)\n\n"'```'"\n$val\n"'```'"\n\n$build_link" From 0cee87fbd8221c230a8a960bf1dfebc1d7a246b8 Mon Sep 17 00:00:00 2001 From: Jakub Strzebonski Date: Mon, 17 Oct 2022 10:39:45 +0200 Subject: [PATCH 3/4] #1940: use UTC timezone --- scripts/report_logs_in_comment.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/report_logs_in_comment.sh b/scripts/report_logs_in_comment.sh index b08ccaeefe..9010f865bb 100755 --- a/scripts/report_logs_in_comment.sh +++ b/scripts/report_logs_in_comment.sh @@ -103,7 +103,7 @@ fi # Build comment commit_sha="$(git log --skip=1 -1 --pretty=format:%H)" -commit_date="$(git show -s --format=%cd --date=format:'%Y-%m-%d %H:%M:%S' "$commit_sha")" +commit_date="$(TZ=UTC0 git show -s --format=%cd --date=format-local:'%Y-%m-%d %H:%M:%S' "$commit_sha")" build_link='[Build log](https://dev.azure.com/DARMA-tasking/DARMA/_build/results?buildId='"$build_id"'&view=logs&j='"$job_id"'&t='"$task_id)" comment_body="Build for $commit_sha ($commit_date)\n\n"'```'"\n$val\n"'```'"\n\n$build_link" From 708fc33fae2d77fe68a90eda6d003d02b28eda13 Mon Sep 17 00:00:00 2001 From: Jakub Strzebonski Date: Tue, 18 Oct 2022 07:33:22 +0200 Subject: [PATCH 4/4] #1940: add 'UTC' to comment --- scripts/report_logs_in_comment.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/report_logs_in_comment.sh b/scripts/report_logs_in_comment.sh index 9010f865bb..865ed93501 100755 --- a/scripts/report_logs_in_comment.sh +++ b/scripts/report_logs_in_comment.sh @@ -105,7 +105,7 @@ fi commit_sha="$(git log --skip=1 -1 --pretty=format:%H)" commit_date="$(TZ=UTC0 git show -s --format=%cd --date=format-local:'%Y-%m-%d %H:%M:%S' "$commit_sha")" build_link='[Build log](https://dev.azure.com/DARMA-tasking/DARMA/_build/results?buildId='"$build_id"'&view=logs&j='"$job_id"'&t='"$task_id)" -comment_body="Build for $commit_sha ($commit_date)\n\n"'```'"\n$val\n"'```'"\n\n$build_link" +comment_body="Build for $commit_sha ($commit_date UTC)\n\n"'```'"\n$val\n"'```'"\n\n$build_link" # Fix new lines new_line="\n"