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
3 changed files with 6 additions and 2 deletions
Showing only changes of commit 0119f2dae1 - Show all commits

View File

@ -53,7 +53,7 @@ jobs:
- name: My PR action
uses: ./
with:
github_token: ${{ secrets.REPO_TOKEN }}
token: ${{ secrets.REPO_TOKEN }}
branch: update/pre-commit-hooks
title: My PR Title
body: My PR Body

View File

@ -3,7 +3,7 @@ description: Creates a pull request for a branch if it does not already exist
inputs:
token:
description: Token for authentication. Github Token will not work.
required: false
required: true
branch:
description: Branch for which to create the PR
required: true

View File

@ -20,6 +20,10 @@ async function getAndPostPullRequests() {
const token = core.getInput("token");
let branch = core.getInput("branch");
if (!token || token.trim() === "") {
throw new Error("No token provided. Please provide a valid token.");
}
// Construct the URL for the requests
const url = `${baseUrl}/api/v1/repos/${owner}/${repo}/pulls`;