Skip to content

Commit

Permalink
Android: Add module suffix to manifest diff id to enable multi comments
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ParaskP7 committed Feb 21, 2025
1 parent 9cfd01c commit 94116d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/comment_with_manifest_diff
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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

0 comments on commit 94116d9

Please sign in to comment.