Added PR actions
Some checks failed
Auto Maintenance Cycle / pre-commit Autoupdate (push) Failing after 32s

This commit is contained in:
Philipp Horstenkamp 2023-11-19 22:36:42 +01:00
parent 0119f2dae1
commit c17dce6a79
Signed by: Philipp
GPG Key ID: DD53EAC36AFB61B4
3 changed files with 9 additions and 5 deletions

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}`, {