mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00
feat: optional input for git ops token
This commit is contained in:
parent
10a399b4b0
commit
be547fcbbb
5 changed files with 17 additions and 2 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
@ -376,7 +376,7 @@ function createPullRequest(inputs) {
|
|||
// Configure auth
|
||||
if (baseRemote.protocol == 'HTTPS') {
|
||||
core.startGroup('Configuring credential for HTTPS authentication');
|
||||
yield gitAuthHelper.configureToken(inputs.token);
|
||||
yield gitAuthHelper.configureToken(inputs.gitToken);
|
||||
core.endGroup();
|
||||
}
|
||||
core.startGroup('Checking the base repository state');
|
||||
|
@ -1206,6 +1206,7 @@ function run() {
|
|||
try {
|
||||
const inputs = {
|
||||
token: core.getInput('token'),
|
||||
gitToken: core.getInput('git-token'),
|
||||
path: core.getInput('path'),
|
||||
addPaths: utils.getInputAsArray('add-paths'),
|
||||
commitMessage: core.getInput('commit-message'),
|
||||
|
@ -1228,6 +1229,9 @@ function run() {
|
|||
draft: core.getBooleanInput('draft')
|
||||
};
|
||||
core.debug(`Inputs: ${(0, util_1.inspect)(inputs)}`);
|
||||
if (!inputs.gitToken) {
|
||||
inputs.gitToken = inputs.token;
|
||||
}
|
||||
yield (0, create_pull_request_1.createPullRequest)(inputs);
|
||||
}
|
||||
catch (error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue