Skip to content

Commit 54c7524

Browse files
authored
Avoid generating review drafts for merge commits
This avoids generating review drafts for merge commits unless the merge commit has modifications to the review draft (which probably means that it's different from *all* parents of the merge). The code prior to this change tries to generate a review draft if the first parent of the merge commit introduces a review draft. (This happens if "git merge main" is done on a feature branch and main has introduced a review draft.)
1 parent 81f7904 commit 54c7524

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function main {
8787
if [[ -e "$HTML_GIT_DIR" ]]; then
8888
# This is based on https://github.com/whatwg/whatwg.org/pull/201 and should be kept synchronized
8989
# with that.
90-
CHANGED_FILES=$(git --git-dir="$HTML_GIT_DIR" diff --name-only HEAD^ HEAD)
90+
CHANGED_FILES=$(git --git-dir="$HTML_GIT_DIR" show --format="format:" --name-only HEAD)
9191
for CHANGED in $CHANGED_FILES; do # Omit quotes around variable to split on whitespace
9292
if ! [[ "$CHANGED" =~ ^review-drafts/.*.wattsi$ ]]; then
9393
continue

0 commit comments

Comments
 (0)