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 }} token: ${{ secrets.REPO_TOKEN }}
branch: update/pre-commit-hooks branch: update/pre-commit-hooks
title: My PR Title title: My PR Title
body: My PR Body # body: My PR Body
assignees: Philipp assignees: Philipp
reviewers: Philipp reviewers: Philipp
labels: chore labels: chore

View File

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

View File

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