Merge pull request #154 from asheeshdwivedi/add-support-for-private-repo

chore:add-support-for-private-repo
releases/v3
Tycho Bokdam 2022-05-26 07:23:57 +02:00 committed by GitHub
commit a3e335a445
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View File

@ -108,6 +108,11 @@ inputs:
description: 'Path to the pre-changelog-generation script file' description: 'Path to the pre-changelog-generation script file'
required: false required: false
git-url:
description: 'Git Url'
default: 'github.com'
required: false
skip-ci: skip-ci:
description: 'Adds [skip ci] to commit message, to avoid triggering a new build' description: 'Adds [skip ci] to commit message, to avoid triggering a new build'
default: 'true' default: 'true'

View File

@ -18,6 +18,7 @@ module.exports = new (class Git {
const gitUserName = core.getInput('git-user-name') const gitUserName = core.getInput('git-user-name')
const gitUserEmail = core.getInput('git-user-email') const gitUserEmail = core.getInput('git-user-email')
const gitUrl = core.getInput('git-url')
// if the env is dont-use-git then we mock exec as we are testing a workflow // if the env is dont-use-git then we mock exec as we are testing a workflow
if (ENV === 'dont-use-git') { if (ENV === 'dont-use-git') {
@ -38,7 +39,7 @@ module.exports = new (class Git {
// Update the origin // Update the origin
if (githubToken) { if (githubToken) {
this.updateOrigin(`https://x-access-token:${githubToken}@github.com/${GITHUB_REPOSITORY}.git`) this.updateOrigin(`https://x-access-token:${githubToken}@${gitUrl}/${GITHUB_REPOSITORY}.git`)
} }
} }

View File

@ -42,6 +42,7 @@ async function run() {
const skipEmptyRelease = core.getInput('skip-on-empty').toLowerCase() === 'true' const skipEmptyRelease = core.getInput('skip-on-empty').toLowerCase() === 'true'
const conventionalConfigFile = core.getInput('config-file-path') const conventionalConfigFile = core.getInput('config-file-path')
const preChangelogGenerationFile = core.getInput('pre-changelog-generation') const preChangelogGenerationFile = core.getInput('pre-changelog-generation')
const gitUrl = core.getInput('git-url')
const skipCi = core.getInput('skip-ci') const skipCi = core.getInput('skip-ci')
if (skipCi) { if (skipCi) {
@ -58,6 +59,7 @@ async function run() {
core.info(`Using "${tagPrefix}" as tag prefix`) core.info(`Using "${tagPrefix}" as tag prefix`)
core.info(`Using "${outputFile}" as output file`) core.info(`Using "${outputFile}" as output file`)
core.info(`Using "${conventionalConfigFile}" as config file`) core.info(`Using "${conventionalConfigFile}" as config file`)
core.info(`Using "${gitUrl}" as gitUrl`)
if (preCommitFile) { if (preCommitFile) {
core.info(`Using "${preCommitFile}" as pre-commit script`) core.info(`Using "${preCommitFile}" as pre-commit script`)