Skip to content

Commit 0e096e0

Browse files
committed
previous commit worked. now improving output
1 parent e72bca6 commit 0e096e0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/upstream-fix-check.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ jobs:
8484
fi
8585
8686
PR_COMMIT_MESSAGE=$(echo "$PR_COMMIT_DETAILS_JSON" | jq -r '.commit.message')
87+
# Extract the subject (first line) of the PR commit message
88+
PR_COMMIT_SUBJECT=$(echo "$PR_COMMIT_MESSAGE" | head -n 1)
8789
8890
# Extract the upstream Linux commit hash from the PR commit message.
8991
UPSTREAM_LINUX_HASH=$(echo "$PR_COMMIT_MESSAGE" | grep -Eo "^commit [0-9a-f]{40}$" | awk '{print $2}')
@@ -97,8 +99,8 @@ jobs:
9799
98100
# --- Check if the upstream hash exists in the local cloned Linux kernel repo ---
99101
if ! git -C linux cat-file -e "$UPSTREAM_LINUX_HASH"; then
100-
printf -v PR_COMMENT_BODY_ACCUMULATOR "%s- **PR commit \`%s\`**: References upstream commit \`%s\` which was **NOT found** in the Linux kernel repository. Please verify the hash.\n" \
101-
"$PR_COMMENT_BODY_ACCUMULATOR" "$PR_COMMIT_SHA" "$UPSTREAM_LINUX_HASH"
102+
printf -v PR_COMMENT_BODY_ACCUMULATOR "%s- **PR commit \`%s\` - %s**: References upstream commit \`%s\` which was **NOT found** in the Linux kernel repository. Please verify the hash.\n" \
103+
"$PR_COMMENT_BODY_ACCUMULATOR" "$PR_COMMIT_SHA" "$PR_COMMIT_SUBJECT" "$UPSTREAM_LINUX_HASH"
102104
continue # Skip to next PR commit, but added message to comment
103105
fi
104106
@@ -124,8 +126,8 @@ jobs:
124126
--regexp-ignore-case)
125127
126128
if [ -n "$GIT_LOG_FIXES_OUTPUT" ]; then
127-
printf -v PR_COMMENT_BODY_ACCUMULATOR "%s- **PR commit \`%s\`**: References upstream commit \`%s\` which has the following fixes in the Linux kernel log:\n" \
128-
"$PR_COMMENT_BODY_ACCUMULATOR" "$PR_COMMIT_SHA" "$UPSTREAM_LINUX_HASH"
129+
printf -v PR_COMMENT_BODY_ACCUMULATOR "%s- **PR commit \`%s\` - %s**: References upstream commit \`%s\` which has the following fixes in the Linux kernel log:\n" \
130+
"$PR_COMMENT_BODY_ACCUMULATOR" "$PR_COMMIT_SHA" "$PR_COMMIT_SUBJECT" "$UPSTREAM_LINUX_HASH"
129131
# Add a markdown code block for the git log output
130132
printf -v PR_COMMENT_BODY_ACCUMULATOR "%s\`\`\`\n%s\n\`\`\`\n" \
131133
"$PR_COMMENT_BODY_ACCUMULATOR" "$GIT_LOG_FIXES_OUTPUT"

0 commit comments

Comments
 (0)