Created a first draft of this action. #14

Merged
Philipp merged 68 commits from draft into main 2023-11-19 23:21:49 +01:00
803 changed files with 54130 additions and 0 deletions
Showing only changes of commit c17dce6a79 - Show all commits

View File

@ -59,3 +59,4 @@ jobs:
body: My PR Body
assignees: Philipp
reviewers: Philipp
labels: chore

View File

@ -24,6 +24,10 @@ 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

View File

@ -1,5 +1,4 @@
const core = require("@actions/core");
const _ = require("underscore");
async function getAndPostPullRequests() {
try {
@ -41,10 +40,10 @@ async function getAndPostPullRequests() {
body: body,
head: branch,
base: base_branch,
// assignees: assigneesInput ? assigneesInput.split(",") : [], // Changed to be omitted if empty
// labels: labelsInput ? labelsInput.split(",").map(Number) : [], // 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
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}`, {