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
2 changed files with 0 additions and 11 deletions
Showing only changes of commit 9a8172e92d - Show all commits

View File

@ -24,10 +24,6 @@ inputs:
description: Comma-separated list of reviewers for the pull request description: Comma-separated list of reviewers for the pull request
required: false required: false
default: '' default: ''
labels:
desdescription: Comma-separated list of labels for the pull request
required: false
default: ''
outputs: outputs:
pull_request_url: pull_request_url:
description: URL of the created pull request description: URL of the created pull request

View File

@ -13,7 +13,6 @@ async function getAndPostPullRequests() {
const title = core.getInput("title"); const title = core.getInput("title");
const body = core.getInput("body") || ""; const body = core.getInput("body") || "";
const assigneesInput = core.getInput("assignees"); const assigneesInput = core.getInput("assignees");
const labelsInput = core.getInput("labels");
const dueDate = core.getInput("due_date"); const dueDate = core.getInput("due_date");
const milestone = core.getInput("milestone"); const milestone = core.getInput("milestone");
const token = core.getInput("token"); const token = core.getInput("token");
@ -41,15 +40,9 @@ async function getAndPostPullRequests() {
head: branch, head: branch,
base: base_branch, base: base_branch,
assignees: assigneesInput ? assigneesInput.split(",") : [], // Changed to be omitted if empty 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 due_date: dueDate || undefined, // Changed to be omitted if empty
milestone: milestone ? parseInt(milestone, 10) : 0, // 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 // Perform the POST request
core.info(`URL for POST request: ${url}`); core.info(`URL for POST request: ${url}`);