The create_issue tool is functional but could be more powerful if it allowed for assigning users at the moment of creation. The underlying gh issue create command already supports this via the --assignee flag.
This ticket proposes enhancing the existing create_issue tool to support an optional assignees parameter.
Proposed Solution
Update OpenAPI Spec:
- In
ai/mcp/server/github-workflow/openapi.yaml, modify the request body schema for the create_issue operation.
- Add a new optional property:
assignees (array of strings).
Update IssueService.mjs:
- Modify the
createIssue method to accept the new assignees parameter from its options object.
- Add a permission check: If the
assignees array is provided and is not empty, the method must first check the cached RepositoryService.viewerPermission.
- If the user's permission level is not one of the
writePermissions (ADMIN, MAINTAIN, WRITE), the tool must return a 403 Forbidden error, similar to the assign_issue tool.
- If the permission check passes, the method should add the appropriate
--assignee flags to the gh command arguments.
- If no
assignees are provided, the tool should function as it currently does.
Acceptance Criteria
- The
create_issue tool now accepts an optional assignees array.
- Providing assignees without sufficient permissions results in a clear error message and does not create the issue.
- Providing assignees with sufficient permissions creates the issue and assigns the specified users correctly.
The
create_issuetool is functional but could be more powerful if it allowed for assigning users at the moment of creation. The underlyinggh issue createcommand already supports this via the--assigneeflag.This ticket proposes enhancing the existing
create_issuetool to support an optionalassigneesparameter.Proposed Solution
Update OpenAPI Spec:
ai/mcp/server/github-workflow/openapi.yaml, modify the request body schema for thecreate_issueoperation.assignees(array of strings).Update
IssueService.mjs:createIssuemethod to accept the newassigneesparameter from its options object.assigneesarray is provided and is not empty, the method must first check the cachedRepositoryService.viewerPermission.writePermissions(ADMIN,MAINTAIN,WRITE), the tool must return a403 Forbiddenerror, similar to theassign_issuetool.--assigneeflags to theghcommand arguments.assigneesare provided, the tool should function as it currently does.Acceptance Criteria
create_issuetool now accepts an optionalassigneesarray.