Skip to content

Conversation

bjohansebas
Copy link

I want to help get this tool out of beta :)

I've been taking references from how it's done in https://github.com/actions/javascript-action/blob/14c58ed4a7813f8bd0b980f088cee5e31b46c6b6

Related #10

Comment on lines +145 to +150
if (autoPush) {
// @see: https://github.com/actions-js/push/blob/master/start.sh#L43
core.info('Pushing changes to database and report')
const remoteRepo = `https://${process.env.INPUT_GITHUB_ACTOR}:${githubToken}@github.com/${process.env.INPUT_REPOSITORY}.git`
await exec.exec(`git push origin ${process.env.GITHUB_HEAD_REF} --force --no-verify --repo ${remoteRepo}`)
}
core.info('Pushing changes to database and report')
const remoteRepo = `https://${process.env.INPUT_GITHUB_ACTOR}:${githubToken}@github.com/${process.env.INPUT_REPOSITORY}.git`
await exec.exec(`git push origin ${process.env.GITHUB_HEAD_REF} --force --no-verify --repo ${remoteRepo}`)
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm worried that the GitHub token might be displayed when something fails. Maybe I should limit it to a smaller scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant