From 9a671e23167bcb87c8b4ba3dbb5008898535c7e3 Mon Sep 17 00:00:00 2001 From: Andrea Jemmett <1787979+acidghost@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:31:11 +0200 Subject: [PATCH] fix URLs in summary for scheduled workflows --- src/index.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/index.js b/src/index.js index 5625d61..c80a8b7 100755 --- a/src/index.js +++ b/src/index.js @@ -46,24 +46,7 @@ if (!supportedEvents.includes(eventType)) { } // Determine if the github user is an individual or an organization -let githubUsername = ""; - -// eventJSON.repository is undefined for scheduled events -if (eventType == "schedule") { - githubUsername = process.env.GITHUB_REPOSITORY_OWNER; - eventJSON.repository = { - owner: { - login: process.env.GITHUB_REPOSITORY_OWNER, - }, - full_name: process.env.GITHUB_REPOSITORY, - }; - let repoName = process.env.GITHUB_REPOSITORY; - repoName = repoName.replace(`${process.env.GITHUB_REPOSITORY_OWNER}/`, ""); - // update repo name - process.env.GITHUB_REPOSITORY = repoName; -} else { - githubUsername = eventJSON.repository.owner.login; -} +const githubUsername = eventJSON.repository.owner.login; const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN,