mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
fix: align PR button custom_id with parser, secure token deletion, load zh locale
This commit is contained in:
parent
589558a20d
commit
9f875e3180
3 changed files with 9 additions and 4 deletions
|
|
@ -84,11 +84,12 @@ export function formatPullRequest(
|
|||
});
|
||||
}
|
||||
|
||||
const actionable = pr.state === "open" && !!repo && pr.number != null;
|
||||
const [repoOwner, repoName] = (repo ?? "/").split("/", 2);
|
||||
const actionable = pr.state === "open" && !!repoOwner && !!repoName && pr.number != null;
|
||||
const actions: NeutralAction[] | undefined = actionable
|
||||
? [
|
||||
{ id: `ghpr|merge|${repo}|${pr.number}`, label: "合并", style: "primary" },
|
||||
{ id: `ghpr|close|${repo}|${pr.number}`, label: "关闭", style: "danger" },
|
||||
{ id: `ghpr|merge|${repoOwner}|${repoName}|${pr.number}`, label: "合并", style: "primary" },
|
||||
{ id: `ghpr|close|${repoOwner}|${repoName}|${pr.number}`, label: "关闭", style: "danger" },
|
||||
]
|
||||
: undefined;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue