From 130a5f137c9ea97ab5fd0d9926ab176311568329 Mon Sep 17 00:00:00 2001 From: Benedict Steven <48621248+bmsteven@users.noreply.github.com> Date: Mon, 25 Apr 2022 00:05:33 +0300 Subject: [PATCH 1/8] Update .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e67876a..fbc2b7d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules - +.env From 40f7a67c91ddc0303cfdebf585d206241c3760ce Mon Sep 17 00:00:00 2001 From: Benedict Steven <48621248+bmsteven@users.noreply.github.com> Date: Mon, 25 Apr 2022 14:25:10 +0300 Subject: [PATCH 2/8] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e67876a..a18f38a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules +.env From 6a6c35328a8c769644cd9d4a778c0a8ff3f3482f Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 25 Apr 2022 14:25:58 +0300 Subject: [PATCH 3/8] test commit --- src/actions.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/actions.js b/src/actions.js index f219dbd..e2917b8 100644 --- a/src/actions.js +++ b/src/actions.js @@ -20,6 +20,8 @@ const run = async () => { branch_name = context.payload.ref?.replace("refs/heads/", ""); } + console.log(branch_name); + // fetching commits let commits = ""; try { From 5781fb5170ef893ef69c2d921bef9d6fc6dc51af Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 25 Apr 2022 14:33:01 +0300 Subject: [PATCH 4/8] fix pull requests filter method --- src/actions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/actions.js b/src/actions.js index e2917b8..10f2f41 100644 --- a/src/actions.js +++ b/src/actions.js @@ -167,12 +167,13 @@ const run = async () => { run(); const createorupdatepr = async ({ branch, owner, repo, body, full_name }) => { + console.log("head-branch", branch); try { const existing_pr = await octokit.rest.pulls.list({ owner, repo, state: "open", - head: branch, + head: owner + ":" + branch, base: DESTINATION_BRANCH, }); if (existing_pr?.data?.length === 0) { From 8364d9b47450f3723bf0388ab51bf5df354db370 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 25 Apr 2022 14:33:26 +0300 Subject: [PATCH 5/8] add build file --- action/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/action/index.js b/action/index.js index 10f5931..513d08b 100644 --- a/action/index.js +++ b/action/index.js @@ -12406,7 +12406,6 @@ const octokit = github.getOctokit(GITHUB_TOKEN); const { context = {} } = github; const run = async () => { - // check branch; let branch_name = context.payload?.head_commit?.message ?.split("from")[1] ?.split("\n")[0] @@ -12418,6 +12417,8 @@ const run = async () => { branch_name = context.payload.ref?.replace("refs/heads/", ""); } + console.log(branch_name); + // fetching commits let commits = ""; try { @@ -12563,12 +12564,13 @@ const run = async () => { run(); const createorupdatepr = async ({ branch, owner, repo, body, full_name }) => { + console.log("head-branch", branch); try { const existing_pr = await octokit.rest.pulls.list({ owner, repo, state: "open", - head: branch, + head: owner + ":" + branch, base: DESTINATION_BRANCH, }); if (existing_pr?.data?.length === 0) { From b7ee3a60285c9eab3582e38fb52ce2f0908e2df0 Mon Sep 17 00:00:00 2001 From: Benedict Steven <48621248+bmsteven@users.noreply.github.com> Date: Mon, 25 Apr 2022 14:35:53 +0300 Subject: [PATCH 6/8] Update .gitignore --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index a18f38a..3c3629e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1 @@ node_modules - - -.env From 2639128eaab5331a00339fb89f646c97648e1ec6 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 25 Apr 2022 14:38:47 +0300 Subject: [PATCH 7/8] add build file --- src/actions.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/actions.js b/src/actions.js index 10f2f41..ce56733 100644 --- a/src/actions.js +++ b/src/actions.js @@ -20,8 +20,6 @@ const run = async () => { branch_name = context.payload.ref?.replace("refs/heads/", ""); } - console.log(branch_name); - // fetching commits let commits = ""; try { @@ -167,7 +165,6 @@ const run = async () => { run(); const createorupdatepr = async ({ branch, owner, repo, body, full_name }) => { - console.log("head-branch", branch); try { const existing_pr = await octokit.rest.pulls.list({ owner, From 0ebe671a8ce5007ab8632f0c9d602cb00ac95d86 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 25 Apr 2022 14:39:02 +0300 Subject: [PATCH 8/8] add build file --- action/index.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/action/index.js b/action/index.js index 513d08b..9850da2 100644 --- a/action/index.js +++ b/action/index.js @@ -12417,8 +12417,6 @@ const run = async () => { branch_name = context.payload.ref?.replace("refs/heads/", ""); } - console.log(branch_name); - // fetching commits let commits = ""; try { @@ -12564,7 +12562,6 @@ const run = async () => { run(); const createorupdatepr = async ({ branch, owner, repo, body, full_name }) => { - console.log("head-branch", branch); try { const existing_pr = await octokit.rest.pulls.list({ owner,