From 13dee4e953740fad3ad955c7ff54a6605be32a67 Mon Sep 17 00:00:00 2001 From: Philipp Horstenkamp Date: Sun, 19 Nov 2023 13:40:58 +0100 Subject: [PATCH] Some simplifications. --- index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 0661402..7e91878 100644 --- a/index.js +++ b/index.js @@ -17,10 +17,8 @@ async function getAndPostPullRequests() { core.info(`Repository Name: ${repo}`); const branch = core.getInput("branch"); - core.info(`The branch ${branch} should be merged.`); - const base_branch = core.getInput("base_branch") || "main"; - core.info(`The branch ${base_branch} should be merged into.`); + core.info(`The branch ${branch} should be merged into ${base_branch} .`); // core.info(`Post Data: ${JSON.stringify(postData)}`); @@ -39,8 +37,7 @@ async function getAndPostPullRequests() { // Perform the GET request core.info("Performing GET request..."); - const get_url = `${url}?state=open`; - const getResponse = await fetch(get_url, { headers }); + const getResponse = await fetch(`${url}?state=open`, { headers }); if (!getResponse.ok) { throw new Error(`HTTP error! status: ${getResponse.status}`);