Drafted a first verion of this action #5
5
index.js
5
index.js
@ -15,8 +15,7 @@ async function getAndPostPullRequests() {
|
||||
core.getInput("repo") || process.env.GITHUB_REPOSITORY.split("/")[1];
|
||||
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");
|
||||
core.info("GitHub token retrieved.");
|
||||
@ -45,7 +44,7 @@ async function getAndPostPullRequests() {
|
||||
// Logic to decide if a POST request is needed
|
||||
if (pulls.length === 0) {
|
||||
core.info("No open pulls found, proceeding with POST request...");
|
||||
|
||||
return { message: "Abort for thesting" };
|
||||
// Perform the POST request
|
||||
const postResponse = await fetch(url, {
|
||||
method: "POST",
|
||||
|
Loading…
x
Reference in New Issue
Block a user