fix: issues with pagination not resolving correct url templates
This commit is contained in:
@@ -187,11 +187,11 @@ export async function main(): Promise<MainResult> {
|
||||
|
||||
let defaultBranch: string | undefined;
|
||||
try {
|
||||
const repoData = await gitea.rest.repository.repoGet({
|
||||
owner: repoContext.owner,
|
||||
repo: repoContext.name,
|
||||
});
|
||||
defaultBranch = repoData.data.default_branch;
|
||||
const repoData = await gitea.request(
|
||||
"GET /repos/{owner}/{repo}",
|
||||
{ owner: repoContext.owner, repo: repoContext.name }
|
||||
);
|
||||
defaultBranch = (repoData.data as { default_branch?: string }).default_branch;
|
||||
} catch {
|
||||
defaultBranch = "main";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user