diff --git a/.github/workflows/auto-integration-pr.yml b/.github/workflows/auto-integration-pr.yml index 92edd618c..b3e04053e 100644 --- a/.github/workflows/auto-integration-pr.yml +++ b/.github/workflows/auto-integration-pr.yml @@ -46,6 +46,7 @@ jobs: - name: Install depends for load scripts run: | npm install js-yaml + npm install shelljs npm install @octokit/rest npm install @octokit/auth-app @@ -137,6 +138,12 @@ jobs: auotintegrationbranch = "topic-auto-integration-" + topic } + // checkout the branch if it existed + const shell = require('shelljs') + if (shell.exec(`git checkout ${auotintegrationbranch}`).code !== 0) { + console.log(auotintegrationbranch, " not existed, use master branch") + } + // genarate integration.yml const yaml = require('js-yaml') const fs = require('fs')