# Update Epic — GitLab

> Updates an epic. See the documentation

- Key: `gitlab-update-epic`
- Type: Action (Write)
- Version: 0.0.5
- App: GitLab (`gitlab`) — https://pipedream.com/apps/gitlab.md
- This page (HTML): https://pipedream.com/apps/gitlab/actions/update-epic
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/gitlab/actions/update-epic/update-epic.mjs

## Description

Updates an epic. [See the documentation](https://docs.gitlab.com/ee/api/epics.html#update-epic)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `groupId` | `string` | Yes | Select a Group or use a custom Group ID. You must be an Owner of this group Options are loaded from the connected account. |
| `epicIid` | `string` | Yes | The internal ID of a project's epic. This feature is restricted to Gitlab's Premium and Ultimate tiers. Options are loaded from the connected account. |
| `add_labels` | `string[]` | No | The comma-separated list of labels Options are loaded from the connected account. |
| `confidential` | `boolean` | No | Whether the epic should be confidential |
| `description` | `string` | No | The description of the issue |
| `labels` | `string[]` | No | Comma-separated label names for an issue. Set to an empty string to unassign all labels. Options are loaded from the connected account. |
| `parent_id` | `string` | No | The ID of a parent epic. Available in GitLab 14.6 and later Options are loaded from the connected account. |
| `remove_labels` | `string[]` | No | Comma-separated label names to remove from an issue. Options are loaded from the connected account. |
| `stateEvent` | `string` | No | The state event of an issue. Set close to close the issue and reopen to reopen it |
| `title` | `string` | No | The title of an epic |
| `updated_at` | `string` | No | When the epic was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z . Requires administrator or project/group owner privileges (available in GitLab 13.5 and later) |
| `color` | `string` | No | The color of the epic. Introduced in GitLab 14.8, behind a feature flag named epic_highlight_color (disabled by default) |
| `start_date_is_fixed` | `boolean` | No | Whether start date should be sourced from start_date_fixed or from milestones (in GitLab 11.3 and later) |
| `due_date_is_fixed` | `boolean` | No | Whether due date should be sourced from due_date_fixed or from milestones (in GitLab 11.3 and later) |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "gitlab",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "gitlab-update-epic",
  arguments: {
    groupId: "Group ID",
    epicIid: "Epic Internal ID",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "gitlab-update-epic",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    gitlab: { authProvisionId: "apn_xxxxxxx" },
    groupId: "Group ID",
    epicIid: "Epic Internal ID",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "gitlab-update-epic",
    "configured_props": {
      "gitlab": { "authProvisionId": "apn_xxxxxxx" },
      "groupId": "Group ID",
      "epicIid": "Epic Internal ID"
    }
  }'
```

---

- App: https://pipedream.com/apps/gitlab.md · All apps: https://pipedream.com/apps
