Skip to content

Commit

Permalink
chore(CI): intergration checkout if branch existed
Browse files Browse the repository at this point in the history
fix for integration with topics

log:
  • Loading branch information
hudeng-go authored and myml committed Jul 5, 2023
1 parent 026cb90 commit 3fa908e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/auto-integration-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 3fa908e

Please sign in to comment.