feat(github): support PR URLs in task creation dialog (#379)
This commit is contained in:
@@ -3,6 +3,7 @@ import type {
|
||||
GitHubStatusResponse,
|
||||
GitHubOrg,
|
||||
GitHubRepoInfo,
|
||||
GitHubPR,
|
||||
TaskPRsResponse,
|
||||
TaskPR,
|
||||
PRFeedback,
|
||||
@@ -141,6 +142,19 @@ export async function searchOrgRepos(org: string, query?: string, options?: ApiR
|
||||
);
|
||||
}
|
||||
|
||||
// PR info (lightweight)
|
||||
export async function fetchPRInfo(
|
||||
owner: string,
|
||||
repo: string,
|
||||
number: number,
|
||||
options?: ApiRequestOptions,
|
||||
) {
|
||||
return fetchJson<GitHubPR>(
|
||||
`/api/v1/github/prs/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/${number}/info`,
|
||||
options,
|
||||
);
|
||||
}
|
||||
|
||||
// Remote repo branches
|
||||
export async function fetchRepoBranches(owner: string, repo: string, options?: ApiRequestOptions) {
|
||||
return fetchJson<{ branches: { name: string }[] }>(
|
||||
|
||||
Reference in New Issue
Block a user