Skip to content

Commit

Permalink
handle undefined repo info
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Feb 12, 2024
1 parent dda59a4 commit 158b455
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async function run(): Promise<void> {
const { eventName, repo, payload } = github.context

// On push to default branch, push to Astro Studio
if (eventName === 'push' && payload.ref === `refs/heads/${payload.repository.default_branch}`) {
if (eventName === 'push' && payload.ref === `refs/heads/${payload.repository?.default_branch ?? 'main'}`) {
await push();
return;
}
Expand Down

0 comments on commit 158b455

Please sign in to comment.