Drafted a first verion of this action #5
@ -24,10 +24,6 @@ inputs:
|
||||
description: Comma-separated list of reviewers for the pull request
|
||||
required: false
|
||||
default: ''
|
||||
labels:
|
||||
desdescription: Comma-separated list of labels for the pull request
|
||||
required: false
|
||||
default: ''
|
||||
outputs:
|
||||
pull_request_url:
|
||||
description: URL of the created pull request
|
||||
|
7
index.js
7
index.js
@ -13,7 +13,6 @@ async function getAndPostPullRequests() {
|
||||
const title = core.getInput("title");
|
||||
const body = core.getInput("body") || "";
|
||||
const assigneesInput = core.getInput("assignees");
|
||||
const labelsInput = core.getInput("labels");
|
||||
const dueDate = core.getInput("due_date");
|
||||
const milestone = core.getInput("milestone");
|
||||
const token = core.getInput("token");
|
||||
@ -41,15 +40,9 @@ async function getAndPostPullRequests() {
|
||||
head: branch,
|
||||
base: base_branch,
|
||||
assignees: assigneesInput ? assigneesInput.split(",") : [], // Changed to be omitted if empty
|
||||
labels: labelsInput ? labelsInput.split(",") : [], // Changed to be omitted if empty
|
||||
due_date: dueDate || undefined, // Changed to be omitted if empty
|
||||
milestone: milestone ? parseInt(milestone, 10) : 0, // Changed to be omitted if empty
|
||||
};
|
||||
// Perform the GET request to check if a similar PR exists
|
||||
const getResponse = await fetch(`${url}?state=open&head=${branch}`, {
|
||||
headers,
|
||||
});
|
||||
|
||||
// Perform the POST request
|
||||
|
||||
core.info(`URL for POST request: ${url}`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user