Skip to content

Commit

Permalink
merge updates from main, if there are any
Browse files Browse the repository at this point in the history
  • Loading branch information
staffbase-robert committed Dec 1, 2021
1 parent 9aee599 commit f418f7f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions src/autodev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ const autoDev = async (): Promise<void> => {
branch: pull.head.ref
}))

if (pulls.length === 0) {
info('🎉 No Pull Requests found. Nothing to merge.')
return
}

await exec(`git config --global user.email "${email}"`)
await exec(`git config --global user.name "${user}"`)
await exec('git fetch')
Expand All @@ -50,6 +45,9 @@ const autoDev = async (): Promise<void> => {
// only push to defined branch if there are changes
if (await hasDiff('HEAD', `origin/${branch}`)) {
await exec('git push -f')
} else if (pulls.length === 0) {
info('🎉 No Pull Requests found. Nothing to merge.')
return
}

info(message)
Expand Down

0 comments on commit f418f7f

Please sign in to comment.