Some simplifications.
Some checks failed
Auto Maintenance Cycle / pre-commit Autoupdate (push) Failing after 38s

This commit is contained in:
Philipp Horstenkamp 2023-11-19 13:40:58 +01:00
parent 8c18455f90
commit 13dee4e953
Signed by: Philipp
GPG Key ID: DD53EAC36AFB61B4

View File

@ -17,10 +17,8 @@ async function getAndPostPullRequests() {
core.info(`Repository Name: ${repo}`); core.info(`Repository Name: ${repo}`);
const branch = core.getInput("branch"); const branch = core.getInput("branch");
core.info(`The branch ${branch} should be merged.`);
const base_branch = core.getInput("base_branch") || "main"; 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)}`); // core.info(`Post Data: ${JSON.stringify(postData)}`);
@ -39,8 +37,7 @@ async function getAndPostPullRequests() {
// Perform the GET request // Perform the GET request
core.info("Performing GET request..."); core.info("Performing GET request...");
const get_url = `${url}?state=open`; const getResponse = await fetch(`${url}?state=open`, { headers });
const getResponse = await fetch(get_url, { headers });
if (!getResponse.ok) { if (!getResponse.ok) {
throw new Error(`HTTP error! status: ${getResponse.status}`); throw new Error(`HTTP error! status: ${getResponse.status}`);