diff --git a/index.js b/index.js index 4f327cc..0acd553 100644 --- a/index.js +++ b/index.js @@ -46,11 +46,11 @@ async function getAndPostPullRequests() { body: body, head: branch, base: base_branch, - assignee: assignee, - assignees: assigneesInput ? assigneesInput.split(",") : [], - labels: labelsInput ? labelsInput.split(",").map(Number) : [], - due_date: dueDate ? dueDate : null, - milestone: milestone ? parseInt(milestone, 10) : null, + assignee: assignee || undefined, // Changed to be omitted if empty + assignees: assigneesInput ? assigneesInput.split(",") : undefined, // Changed to be omitted if empty + labels: labelsInput ? labelsInput.split(",").map(Number) : undefined, // Changed to be omitted if empty + due_date: dueDate || undefined, // Changed to be omitted if empty + milestone: milestone ? parseInt(milestone, 10) : undefined, // Changed to be omitted if empty }; // Perform the GET request to check if a similar PR exists