From 94116d9dfcc24d22544cfbf34ea304cf39e7e90f Mon Sep 17 00:00:00 2001 From: Petros Paraskevopoulos Date: Fri, 21 Feb 2025 16:57:19 +0200 Subject: [PATCH] Android: Add module suffix to manifest diff id to enable multi comments This is done so that when multiple modules exist, and more than one module has a manifest diff, that the previous comment is not overridden by the newest comment, and thus enabling multiple manifest diff comments. --- bin/comment_with_manifest_diff | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/comment_with_manifest_diff b/bin/comment_with_manifest_diff index 6da98bf..c473de8 100755 --- a/bin/comment_with_manifest_diff +++ b/bin/comment_with_manifest_diff @@ -44,7 +44,7 @@ if [ "${BUILDKITE_PULL_REQUEST:-false}" == "false" ]; then exit 2 fi -DIFF_MANIFEST_FOLDER="./build/reports/diff_manifest" +DIFF_MANIFEST_FOLDER="./build/reports/diff_manifest/${MODULE}/${BUILD_VARIANT}" TRUNK_MANIFEST_FILE="$DIFF_MANIFEST_FOLDER/trunk_AndroidManifest.txt" PR_MANIFEST_FILE="$DIFF_MANIFEST_FOLDER/pr_AndroidManifest.txt" DIFF_MANIFEST_FILE="$DIFF_MANIFEST_FOLDER/diff_manifest.txt" @@ -101,7 +101,7 @@ if [ -n "$DIFF_MANIFEST_FILE" ]; then append_content "## Project manifest changes" "$(generate_manifest_comment_body)" fi - comment_on_pr --id "manifest-diff" --if-exist update "$COMMENT_FILE" + comment_on_pr --id "manifest-diff-${MODULE}-${BUILD_VARIANT}" --if-exist update "$COMMENT_FILE" else - comment_on_pr --id "manifest-diff" --if-exist delete + comment_on_pr --id "manifest-diff-${MODULE}-${BUILD_VARIANT}" --if-exist delete fi