update_issue
Modify existing GitLab project issues by updating titles, descriptions, states, labels, assignees, or milestones to track progress and manage tasks.
Instructions
Update an existing issue in a GitLab project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID or URL-encoded path | |
| issue_iid | Yes | Issue internal ID | |
| title | No | New issue title | |
| description | No | New issue description | |
| state_event | No | Change issue state | |
| labels | No | Array of label names | |
| assignee_ids | No | Array of user IDs to assign | |
| milestone_id | No | Milestone ID to assign |
Implementation Reference
- src/api/issues.ts:100-127 (handler)Implementation of the updateIssue API handler, which performs a PUT request to the GitLab API to update an issue's details.
export async function updateIssue( projectId: string, issueIid: number, options: { title?: string; description?: string; state_event?: "close" | "reopen"; labels?: string[]; assignee_ids?: number[]; milestone_id?: number; } ): Promise<GitLabIssue> { if (!projectId?.trim()) { throw new Error("Project ID is required"); } if (!issueIid || issueIid < 1) { throw new Error("Valid issue IID is required"); } const endpoint = `/projects/${encodeProjectId(projectId)}/issues/${issueIid}`; const issue = await gitlabPut<GitLabIssue>(endpoint, { ...options, labels: options.labels?.join(",") }); return GitLabIssueSchema.parse(issue); }