From e07a19c3b8366f5814c584ca34b5cc2b223fe988 Mon Sep 17 00:00:00 2001 From: Ben Date: Sat, 23 Apr 2022 00:00:22 +0300 Subject: [PATCH] test update pr --- src/develop_actions.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/develop_actions.js b/src/develop_actions.js index 3e00a1e..bd1a9b8 100644 --- a/src/develop_actions.js +++ b/src/develop_actions.js @@ -121,7 +121,7 @@ const run = async () => { // update PR try { // fetching existing PR - const existing_pr = await this.octokit.rest.pulls.list({ + const existing_pr = await octokit.rest.pulls.list({ owner: context.payload?.repository?.owner?.login, repo: context.payload?.repository?.name, state: "open", @@ -130,7 +130,7 @@ const run = async () => { }); console.log("existing PR", existing_pr); // update pr - await this.octokit.rest.pulls.update({ + const update_pr = await octokit.rest.pulls.update({ pull_number: existing_pr?.data[0].number, owner: context.payload?.repository?.owner?.login, repo: context.payload?.repository?.name, @@ -139,6 +139,7 @@ const run = async () => { head: branch_name, base: "staging", }); + console.log(update_pr?.data); } catch (error) { console.log("error", error?.message); }