Skip to content

Commit 6ff5fab

Browse files
committed
update repo.ts
1 parent 03c8a3b commit 6ff5fab

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/github/repo.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ function resolveCurrentBranch(ref: string): string {
88
return github.context.payload.pull_request?.head?.ref ?? ''
99
} else if (ref.startsWith('refs/tags/')) {
1010
// Get the repository default branch
11-
const octokit = github.getOctokit(github.context.token)
12-
const { data: default_branch } = octokit.rest.repos.get({
13-
owner: (github.context.repo as string).split('/')[0],
14-
repo: (github.context.repo as string).split('/')[1],
15-
});
16-
return default_branch;
11+
// const octokit = github.getOctokit(github.context.token)
12+
// const { data: default_branch } = octokit.rest.repos.get({
13+
// owner: (github.context.repo as string).split('/')[0],
14+
// repo: (github.context.repo as string).split('/')[1],
15+
// });
16+
return github.context.payload.repo.default_branch;
1717
}
1818

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

0 commit comments

Comments
 (0)