ci: handle the blocksuite commit is not found on current branch (#8061)

This commit is contained in:
Brooooooklyn
2024-09-03 07:09:03 +00:00
parent d819a26bc1
commit 12d73ee290
2 changed files with 9 additions and 0 deletions

View File

@@ -276,6 +276,9 @@ jobs:
deploy-done: deploy-done:
needs: needs:
- output-prev-version - output-prev-version
- build-web
- build-admin
- build-mobile
- build-frontend-image - build-frontend-image
- build-server-image - build-server-image
- deploy - deploy

View File

@@ -49,6 +49,12 @@ async function getChangeLog(repo, previousCommit, currentCommit) {
if (currentCommit) { if (currentCommit) {
const commit = repo.findCommit(currentCommit); const commit = repo.findCommit(currentCommit);
if (!commit) {
console.log(
`Current commit ${currentCommit} not found in ${repo.path()}`
);
return '';
}
revWalk.push(commit.id()); revWalk.push(commit.id());
} else { } else {
revWalk.pushHead(); revWalk.pushHead();