Skip to content

Commit

Permalink
Guard several changea
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Sep 25, 2024
1 parent 8c4cfb3 commit 7b25093
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/plugins/newDefaultOpened.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ export default async (app: App, payload: PullPayload): Promise<void> => {
})
return
}

const changedRepos = await getFileDiff(app, payload, repoCategory || '')
if (changedRepos.length > 1) {
throw Error('Multiple repositories changed')
}

const newRepo = changedRepos.pop()
if (newRepo === undefined) throw Error('No repo')
Expand Down

0 comments on commit 7b25093

Please sign in to comment.