From 769afb5c580da2d34178f403fe6e2b0089f9273d Mon Sep 17 00:00:00 2001 From: Philipp Horstenkamp Date: Sun, 19 Nov 2023 19:10:17 +0100 Subject: [PATCH] Changed the request body. --- index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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