From 44104ccb79d233bf3cb4ba789b8f1c886b0d6be2 Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 17 Jan 2025 08:26:15 +1100 Subject: [PATCH] refactor: Changed PR Context Detection --- src/comment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/comment.ts b/src/comment.ts index d771a13..d9f9b47 100644 --- a/src/comment.ts +++ b/src/comment.ts @@ -60,7 +60,7 @@ export function renderMarkdown({ let footer = '' if (includeFooter === undefined || includeFooter === true) { footer = `\n\n---\n\n_Triggered by @${github.context.actor}` - if ('pull_request' in github.context.payload) { + if (github.context.eventName === 'pull_request') { footer += `, Commit: \`${(github.context.payload as PullRequestEvent).pull_request.head.sha}\`_` } }