Skip to content

fix: add git identity for Github Actions bot #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20021,8 +20021,10 @@ async function run () {
// @see: https://github.com/actions/checkout#push-a-commit-using-the-built-in-token
if (autoCommit) {
core.info('Committing changes to database and report')
await exec.exec('git config user.name github-actions')
await exec.exec('git config user.email [email protected]')
await exec.exec('git config user.name github-actions[bot]')
await exec.exec(
'git config user.email github-actions[bot]@users.noreply.github.com'
)
await exec.exec(`git add ${databasePath}`)
await exec.exec(`git add ${reportPath}`)
await exec.exec('git commit -m "Updated Jenkins Status"')
Expand Down Expand Up @@ -20086,9 +20088,7 @@ async function run () {
newDatabaseState[machine].diskUsage >= diskAlertLevel &&
!issueRelatedToMachine
) {
core.info(
`Generating issue for machine (${machine})...`
)
core.info(`Generating issue for machine (${machine})...`)
await octokit.rest.issues.create({
...context.repo,
title: `${newDatabaseState[machine].name} has low disk space`,
Expand Down
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,10 @@ async function run () {
// @see: https://github.com/actions/checkout#push-a-commit-using-the-built-in-token
if (autoCommit) {
core.info('Committing changes to database and report')
await exec.exec('git config user.name github-actions')
await exec.exec('git config user.email [email protected]')
await exec.exec('git config user.name github-actions[bot]')
await exec.exec(
'git config user.email github-actions[bot]@users.noreply.github.com'
)
await exec.exec(`git add ${databasePath}`)
await exec.exec(`git add ${reportPath}`)
await exec.exec('git commit -m "Updated Jenkins Status"')
Expand Down