Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
StessyMougeot committed Dec 30, 2024
1 parent a64d442 commit b442a6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/github/repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ function resolveCurrentBranch(ref: string): string {
return github.context.payload.pull_request?.head?.ref ?? ''
} else if (ref.startsWith('refs/tags/')) {
// Get the repository default branch
return github.context.repo.default_branch ?? ''
return github.context.default_branch ?? ''

Check failure on line 11 in src/github/repo.ts

View workflow job for this annotation

GitHub Actions / Jest Tests

Unsafe return of a value of type error
}

throw new Error(`Unsupported ref: ${ref}`)
}

export function getContext() {
const { ref, repo } = github.context
const { ref, repo, default_branch } = github.context

Check failure on line 18 in src/github/repo.ts

View workflow job for this annotation

GitHub Actions / Jest Tests

'default_branch' is assigned a value but never used
return {
owner: repo.owner,
repo: repo.repo,
Expand Down

0 comments on commit b442a6a

Please sign in to comment.