diff --git a/.github/workflows/repo-sync.yml b/.github/workflows/repo-sync.yml index 29e20b6895..c11af600f5 100644 --- a/.github/workflows/repo-sync.yml +++ b/.github/workflows/repo-sync.yml @@ -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({