feat(pull-requests): quick actions follow each host's capabilities, not GitHub (#17774)
Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
b0249ac871
commit
9b40d37463
24 files changed
+254
-83
No files matched your search
@@ -30,6 +30,18 @@ export const definition = defineSourceControlClient({
|
||||
defaultCloneTransport: "https",
|
||||
changeRequestUrl: ({ host, repository, number }) =>
|
||||
`https://${host}/${repository}/pull/${number}`,
|
||||
changeRequestActions: new Set([
|
||||
"merge",
|
||||
"ready",
|
||||
"draft",
|
||||
"close",
|
||||
"reopen",
|
||||
"update-branch",
|
||||
"enable-auto-merge",
|
||||
"disable-auto-merge",
|
||||
"revert",
|
||||
"approve-workflows",
|
||||
] as const),
|
||||
checkoutCommand: ({ number }) => `gh pr checkout ${number}`,
|
||||
authorProfileUrl: (login, repositoryUrl) =>
|
||||
login.endsWith("[bot]")
|
||||
|
||||
@@ -20,22 +20,12 @@ import {
|
||||
type ProviderRepositoryRef,
|
||||
} from "@t3tools/source-control-core/server/PullRequestProvider";
|
||||
import type { GitHubViewerAccess, GitHubWorkflowRunApproval } from "./gitHubPullRequestJson.ts";
|
||||
import { definition } from "../client/definition.ts";
|
||||
|
||||
const CAPABILITIES: PullRequestCapabilities = {
|
||||
diff: true,
|
||||
comment: true,
|
||||
actions: [
|
||||
"merge",
|
||||
"ready",
|
||||
"draft",
|
||||
"close",
|
||||
"reopen",
|
||||
"update-branch",
|
||||
"enable-auto-merge",
|
||||
"disable-auto-merge",
|
||||
"revert",
|
||||
"approve-workflows",
|
||||
],
|
||||
actions: [...definition.changeRequestActions],
|
||||
mergeMethods: ["merge", "squash", "rebase"],
|
||||
updateMethods: ["merge", "rebase"],
|
||||
search: true,
|
||||
|
||||
Reference in new issue
Block a user