Drafted a first verion of this action #5

Merged
Philipp merged 68 commits from draft into main 2023-11-19 23:18:27 +01:00
Showing only changes of commit c9eb29d73f - Show all commits

View File

@ -15,8 +15,7 @@ async function getAndPostPullRequests() {
core.getInput("repo") || process.env.GITHUB_REPOSITORY.split("/")[1]; core.getInput("repo") || process.env.GITHUB_REPOSITORY.split("/")[1];
core.info(`Repository Name: ${repo}`); core.info(`Repository Name: ${repo}`);
const postData = JSON.parse(core.getInput("post_data")); // core.info(`Post Data: ${JSON.stringify(postData)}`);
core.info(`Post Data: ${JSON.stringify(postData)}`);
const githubToken = core.getInput("github_token"); const githubToken = core.getInput("github_token");
core.info("GitHub token retrieved."); core.info("GitHub token retrieved.");
@ -45,7 +44,7 @@ async function getAndPostPullRequests() {
// Logic to decide if a POST request is needed // Logic to decide if a POST request is needed
if (pulls.length === 0) { if (pulls.length === 0) {
core.info("No open pulls found, proceeding with POST request..."); core.info("No open pulls found, proceeding with POST request...");
return { message: "Abort for thesting" };
// Perform the POST request // Perform the POST request
const postResponse = await fetch(url, { const postResponse = await fetch(url, {
method: "POST", method: "POST",