From 058201e910d7634819b0298ad5fbd615c3eb9a6c Mon Sep 17 00:00:00 2001 From: Louis Cameron Booth Date: Fri, 7 Jul 2023 14:21:40 +0200 Subject: [PATCH 1/3] Change owner to hardcoded AppMonet value --- lib/createTag.js | 3 ++- src/createTag.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/createTag.js b/lib/createTag.js index 746635c2..bf32a38d 100644 --- a/lib/createTag.js +++ b/lib/createTag.js @@ -46,7 +46,8 @@ function createTag({ tagName, tagMsg = '' }) { console.log(`creating tag "${tagName}"`); // Check for existing tag const git = new github.GitHub(process.env.GITHUB_TOKEN); - const owner = process.env.GITHUB_ACTOR; + // const owner = process.env.GITHUB_ACTOR; + const owner = "AppMonet" const repo = (_a = process.env.GITHUB_REPOSITORY) === null || _a === void 0 ? void 0 : _a.split('/').pop(); const tags = yield git.repos.listTags({ owner, diff --git a/src/createTag.ts b/src/createTag.ts index 930855ef..dac05778 100644 --- a/src/createTag.ts +++ b/src/createTag.ts @@ -16,7 +16,8 @@ export async function createTag({ tagName, tagMsg = '' }) { console.log(`creating tag "${tagName}"`) // Check for existing tag const git = new github.GitHub(process.env.GITHUB_TOKEN) - const owner = process.env.GITHUB_ACTOR as string + // const owner = process.env.GITHUB_ACTOR as string + const owner = "AppMonet" const repo = process.env.GITHUB_REPOSITORY?.split('/').pop() as string const tags = await git.repos.listTags({ From 6590e9c9b873754cfd6269c01bb0b10142ef9d03 Mon Sep 17 00:00:00 2001 From: Louis Cameron Booth Date: Fri, 7 Jul 2023 14:31:16 +0200 Subject: [PATCH 2/3] Use correct env variable --- lib/createTag.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/createTag.js b/lib/createTag.js index bf32a38d..1ef1800e 100644 --- a/lib/createTag.js +++ b/lib/createTag.js @@ -46,8 +46,8 @@ function createTag({ tagName, tagMsg = '' }) { console.log(`creating tag "${tagName}"`); // Check for existing tag const git = new github.GitHub(process.env.GITHUB_TOKEN); - // const owner = process.env.GITHUB_ACTOR; - const owner = "AppMonet" + const owner = process.env.GITHUB_REPOSITORY_OWNER; + // const owner = "AppMonet" const repo = (_a = process.env.GITHUB_REPOSITORY) === null || _a === void 0 ? void 0 : _a.split('/').pop(); const tags = yield git.repos.listTags({ owner, From bb143591bd441bfe85aed571483475e228cefada Mon Sep 17 00:00:00 2001 From: Louis Cameron Booth Date: Fri, 7 Jul 2023 14:32:42 +0200 Subject: [PATCH 3/3] Use correct env --- lib/createTag.js | 1 - src/createTag.ts | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/createTag.js b/lib/createTag.js index 1ef1800e..f5b68397 100644 --- a/lib/createTag.js +++ b/lib/createTag.js @@ -47,7 +47,6 @@ function createTag({ tagName, tagMsg = '' }) { // Check for existing tag const git = new github.GitHub(process.env.GITHUB_TOKEN); const owner = process.env.GITHUB_REPOSITORY_OWNER; - // const owner = "AppMonet" const repo = (_a = process.env.GITHUB_REPOSITORY) === null || _a === void 0 ? void 0 : _a.split('/').pop(); const tags = yield git.repos.listTags({ owner, diff --git a/src/createTag.ts b/src/createTag.ts index dac05778..c4f1b599 100644 --- a/src/createTag.ts +++ b/src/createTag.ts @@ -16,8 +16,7 @@ export async function createTag({ tagName, tagMsg = '' }) { console.log(`creating tag "${tagName}"`) // Check for existing tag const git = new github.GitHub(process.env.GITHUB_TOKEN) - // const owner = process.env.GITHUB_ACTOR as string - const owner = "AppMonet" + const owner = process.env.GITHUB_REPOSITORY_OWNER as string const repo = process.env.GITHUB_REPOSITORY?.split('/').pop() as string const tags = await git.repos.listTags({