Tests for the default value of github actions.
Some checks failed
Auto Maintenance Cycle / pre-commit Autoupdate (push) Failing after 31s

This commit is contained in:
Philipp Horstenkamp 2023-11-19 22:55:53 +01:00
parent 637c6bc426
commit 9365d681df
Signed by: Philipp
GPG Key ID: DD53EAC36AFB61B4
3 changed files with 7 additions and 6 deletions

View File

@ -56,7 +56,7 @@ jobs:
token: ${{ secrets.REPO_TOKEN }}
branch: update/pre-commit-hooks
title: My PR Title
body: My PR Body
# body: My PR Body
assignees: Philipp
reviewers: Philipp
labels: chore

View File

@ -16,6 +16,7 @@ inputs:
body:
description: Body of the pull request
required: false
default: Some default tile!
assignees:
description: Comma-separated list of assignees for the pull request
required: false

View File

@ -13,6 +13,7 @@ async function getAndPostPullRequests() {
const title = core.getInput("title");
const body = core.getInput("body") || "";
const assigneesInput = core.getInput("assignees");
const reviewersInput = core.getIDToken("reviewers");
const dueDate = core.getInput("due_date");
const milestone = core.getInput("milestone");
const token = core.getInput("token");
@ -31,7 +32,6 @@ async function getAndPostPullRequests() {
accept: "application/json",
};
core.info(`token ${token}`);
// Logic for current branch
// Prepare POST data
const postData = {
@ -39,15 +39,15 @@ async function getAndPostPullRequests() {
body: body,
head: branch,
base: base_branch,
assignees: assigneesInput ? assigneesInput.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
assignees: assigneesInput ? assigneesInput.split(",") : [],
reviewers: reviewersInput ? reviewersInput.split(",") : [],
due_date: dueDate || undefined,
milestone: milestone ? parseInt(milestone, 10) : 0,
};
// Perform the POST request
core.info(`URL for POST request: ${url}`);
core.info(`POST data being sent: ${JSON.stringify(postData, null, 2)}`);
core.info(`URL with token: ${url}?access_token=${token}`);
const postResponse = await fetch(`${url}?access_token=${token}`, {
method: "POST",
headers,