Create GitHub issues with markdown and metadata (#3947)

* Create GitHub issues with markdown and metadata

- Add a reusable rich markdown composer for GitHub issue bodies and comments
- Let new GitHub issues include selected labels and assignees through IPC/RPC
- Preserve created issue metadata in the task list and cover the new API path with tests

* fix: address review findings
This commit is contained in:
Jinjing
2026-05-30 18:25:31 -07:00
committed by GitHub
parent bb6b872386
commit 9ca42f5582
16 changed files with 857 additions and 434 deletions
+12 -3
View File
@@ -148,7 +148,9 @@ const RemovePrReviewers = RepoSelector.extend({
const CreateIssue = RepoSelector.extend({
title: requiredString('Missing title'),
body: z.string()
body: z.string(),
labels: z.array(z.string()).optional(),
assignees: z.array(z.string()).optional()
})
const IssueUpdate = z.object({
@@ -478,8 +480,15 @@ export const GITHUB_METHODS: RpcMethod[] = [
defineMethod({
name: 'github.createIssue',
params: CreateIssue,
handler: async (params, { runtime }) =>
runtime.createRepoIssue(params.repo, params.title, params.body)
handler: async (params, { runtime }) => {
const fields =
params.labels !== undefined || params.assignees !== undefined
? { labels: params.labels, assignees: params.assignees }
: undefined
return fields
? runtime.createRepoIssue(params.repo, params.title, params.body, fields)
: runtime.createRepoIssue(params.repo, params.title, params.body)
}
}),
defineMethod({
name: 'github.updateIssue',