Skip to content

Commit

Permalink
fix: Avoid throwing when head and base are diverged
Browse files Browse the repository at this point in the history
  • Loading branch information
abhisek committed Nov 5, 2024
1 parent 67815d8 commit fe1c6b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/vet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,10 @@ export class Vet {
throw new Error(`Unable to get changed files: ${response.status}`)
}

// This is a valid case and happen frequently during development.
// We should not expect that head is always ahead of base.
if (response.data.status !== 'ahead') {
throw new Error(`Head is not ahead of Base: ${response.data.status}`)
core.info(`Head is not ahead of Base: ${response.data.status}`)
}

if (!response.data.files) {
Expand Down

0 comments on commit fe1c6b4

Please sign in to comment.