Skip to content

Commit 39b71e2

Browse files
committed
refactor: comment addComment
1 parent b27770f commit 39b71e2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/common/github/comment.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,11 @@ export const addComment = async (
4949
deployment: PagesDeployment,
5050
output: string
5151
): Promise<string | undefined> => {
52-
const {eventName} = useContextEvent()
53-
5452
const prNodeId = await getNodeIdFromEvent()
5553

5654
if (prNodeId) {
5755
const {sha} = useContext()
56+
const {eventName} = useContextEvent()
5857

5958
const rawBody = `## Cloudflare Pages Deployment\n**Event Name:** ${eventName}\n**Environment:** ${deployment.environment}\n**Project:** ${deployment.project_name}\n**Built with commit:** ${sha}\n**Preview URL:** ${deployment.url}\n**Branch Preview URL:** ${getCloudflareDeploymentAlias(deployment)}\n\n### Wrangler Output\n${output}`
6059

0 commit comments

Comments
 (0)