mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00

* feat: update action runtime to node 16 * feat: allow add-paths to resolve to no changes * docs: update readme * chore: update package lock * chore: bump dependency * ci: add dependabot workflow * docs: update action versions
38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
import * as core from '@actions/core'
|
|
import {Inputs, createPullRequest} from './create-pull-request'
|
|
import {inspect} from 'util'
|
|
import * as utils from './utils'
|
|
|
|
async function run(): Promise<void> {
|
|
try {
|
|
const inputs: Inputs = {
|
|
token: core.getInput('token'),
|
|
path: core.getInput('path'),
|
|
addPaths: utils.getInputAsArray('add-paths'),
|
|
commitMessage: core.getInput('commit-message'),
|
|
committer: core.getInput('committer'),
|
|
author: core.getInput('author'),
|
|
signoff: core.getBooleanInput('signoff'),
|
|
branch: core.getInput('branch'),
|
|
deleteBranch: core.getBooleanInput('delete-branch'),
|
|
branchSuffix: core.getInput('branch-suffix'),
|
|
base: core.getInput('base'),
|
|
pushToFork: core.getInput('push-to-fork'),
|
|
title: core.getInput('title'),
|
|
body: core.getInput('body'),
|
|
labels: utils.getInputAsArray('labels'),
|
|
assignees: utils.getInputAsArray('assignees'),
|
|
reviewers: utils.getInputAsArray('reviewers'),
|
|
teamReviewers: utils.getInputAsArray('team-reviewers'),
|
|
milestone: Number(core.getInput('milestone')),
|
|
draft: core.getBooleanInput('draft')
|
|
}
|
|
core.debug(`Inputs: ${inspect(inputs)}`)
|
|
|
|
await createPullRequest(inputs)
|
|
} catch (error: any) {
|
|
core.setFailed(error.message)
|
|
}
|
|
}
|
|
|
|
run()
|