Add project collaborator

Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project admin to add a collaborator.

octokit.projects.addCollaborator({
project_id,
username,
});

Parameters

namerequireddescription
project_idyes
usernameyes
permissionno

The permission to grant the collaborator.

See also: GitHub Developer Guide documentation.

Create a project card

Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the pull_request key.

Be aware that the id of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull request id, use the "List pull requests" endpoint.

octokit.projects.createCard({
column_id,
note,
content_id,
content_type,
});

Parameters

namerequireddescription
column_idyes

column_id parameter

noteyes

The project card's note

content_idyes

The unique identifier of the content associated with the card

content_typeyes

The piece of content associated with the card

See also: GitHub Developer Guide documentation.

Create a project column

octokit.projects.createColumn({
project_id,
name,
});

Parameters

namerequireddescription
project_idyes
nameyes

Name of the project column

See also: GitHub Developer Guide documentation.

Create a user project

octokit.projects.createForAuthenticatedUser({
name,
});

Parameters

namerequireddescription
nameyes

Name of the project

bodyno

Body of the project

See also: GitHub Developer Guide documentation.

Create an organization project

Creates an organization project board. Returns a 404 Not Found status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.

octokit.projects.createForOrg({
org,
name,
});

Parameters

namerequireddescription
orgyes
nameyes

The name of the project.

bodyno

The description of the project.

See also: GitHub Developer Guide documentation.

Create a repository project

Creates a repository project board. Returns a 404 Not Found status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.

octokit.projects.createForRepo({
owner,
repo,
name,
});

Parameters

namerequireddescription
owneryes
repoyes
nameyes

The name of the project.

bodyno

The description of the project.

See also: GitHub Developer Guide documentation.

Delete a project

Deletes a project board. Returns a 404 Not Found status if projects are disabled.

octokit.projects.delete({
project_id,
});

Parameters

namerequireddescription
project_idyes

See also: GitHub Developer Guide documentation.

Delete a project card

octokit.projects.deleteCard({
card_id,
});

Parameters

namerequireddescription
card_idyes

card_id parameter

See also: GitHub Developer Guide documentation.

Delete a project column

octokit.projects.deleteColumn({
column_id,
});

Parameters

namerequireddescription
column_idyes

column_id parameter

See also: GitHub Developer Guide documentation.

Get a project

Gets a project by its id. Returns a 404 Not Found status if projects are disabled. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.

octokit.projects.get({
project_id,
});

Parameters

namerequireddescription
project_idyes

See also: GitHub Developer Guide documentation.

Get a project card

octokit.projects.getCard({
card_id,
});

Parameters

namerequireddescription
card_idyes

card_id parameter

See also: GitHub Developer Guide documentation.

Get a project column

octokit.projects.getColumn({
column_id,
});

Parameters

namerequireddescription
column_idyes

column_id parameter

See also: GitHub Developer Guide documentation.

Get project permission for a user

Returns the collaborator's permission level for an organization project. Possible values for the permission key: admin, write, read, none. You must be an organization owner or a project admin to review a user's permission level.

octokit.projects.getPermissionForUser({
project_id,
username,
});

Parameters

namerequireddescription
project_idyes
usernameyes

See also: GitHub Developer Guide documentation.

List project cards

octokit.projects.listCards({
column_id,
});

Parameters

namerequireddescription
column_idyes

column_id parameter

archived_stateno

Filters the project cards that are returned by the card's state. Can be one of all,archived, or not_archived.

per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List project collaborators

Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project admin to list collaborators.

octokit.projects.listCollaborators({
project_id,
});

Parameters

namerequireddescription
project_idyes
affiliationno

Filters the collaborators by their affiliation. Can be one of:
* outside: Outside collaborators of a project that are not a member of the project's organization.
* direct: Collaborators with permissions to a project, regardless of organization membership status.
* all: All collaborators the authenticated user can see.

per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List project columns

octokit.projects.listColumns({
project_id,
});

Parameters

namerequireddescription
project_idyes
per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List organization projects

Lists the projects in an organization. Returns a 404 Not Found status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.

octokit.projects.listForOrg({
org,
});

Parameters

namerequireddescription
orgyes
stateno

Indicates the state of the projects to return. Can be either open, closed, or all.

per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List repository projects

Lists the projects in a repository. Returns a 404 Not Found status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.

octokit.projects.listForRepo({
owner,
repo,
});

Parameters

namerequireddescription
owneryes
repoyes
stateno

Indicates the state of the projects to return. Can be either open, closed, or all.

per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

List user projects

octokit.projects.listForUser({
username,
});

Parameters

namerequireddescription
usernameyes
stateno

Indicates the state of the projects to return. Can be either open, closed, or all.

per_pageno

Results per page (max 100)

pageno

Page number of the results to fetch.

See also: GitHub Developer Guide documentation.

Move a project card

octokit.projects.moveCard({
card_id,
position,
});

Parameters

namerequireddescription
card_idyes

card_id parameter

positionyes

The position of the card in a column

column_idno

The unique identifier of the column the card should be moved to

See also: GitHub Developer Guide documentation.

Move a project column

octokit.projects.moveColumn({
column_id,
position,
});

Parameters

namerequireddescription
column_idyes

column_id parameter

positionyes

The position of the column in a project

See also: GitHub Developer Guide documentation.

Remove user as a collaborator

Removes a collaborator from an organization project. You must be an organization owner or a project admin to remove a collaborator.

octokit.projects.removeCollaborator({
project_id,
username,
});

Parameters

namerequireddescription
project_idyes
usernameyes

See also: GitHub Developer Guide documentation.

Update a project

Updates a project board's information. Returns a 404 Not Found status if projects are disabled. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.

octokit.projects.update({
project_id,
});

Parameters

namerequireddescription
project_idyes
nameno

Name of the project

bodyno

Body of the project

stateno

State of the project; either 'open' or 'closed'

organization_permissionno

The baseline permission that all organization members have on this project

privateno

Whether or not this project can be seen by everyone.

See also: GitHub Developer Guide documentation.

Update an existing project card

octokit.projects.updateCard({
card_id,
});

Parameters

namerequireddescription
card_idyes

card_id parameter

noteno

The project card's note

archivedno

Whether or not the card is archived

See also: GitHub Developer Guide documentation.

Update an existing project column

octokit.projects.updateColumn({
column_id,
name,
});

Parameters

namerequireddescription
column_idyes

column_id parameter

nameyes

Name of the project column

See also: GitHub Developer Guide documentation.