1
0
mirror of synced 2026-01-06 06:02:35 -05:00

Update repo sync to skip if no commits (#37806)

This commit is contained in:
Kevin Heis
2023-06-13 11:08:25 -07:00
committed by GitHub
parent 98458c017c
commit 9d9fcc2ae9

View File

@@ -61,14 +61,22 @@ jobs:
To preserve continuity across repos, _do not squash_ this pull request.
`
console.log('Create a new pull request')
let { data: pull } = await github.rest.pulls.create({
owner,
repo,
head,
base,
title: 'Repo sync',
body,
})
try {
let { data: pull } = await github.rest.pulls.create({
owner,
repo,
head,
base,
title: 'Repo sync',
body,
})
} catch (err) {
if (err.message?.includes('No commits')) {
console.log(err.message)
return
}
throw err
}
console.log('Add label', label)
await github.rest.issues.addLabels({