View Source GitHub.Projects (GitHub REST API Client v0.2.3)

Provides API endpoints related to projects

Link to this section Summary

Functions

Create an organization project

Delete a project card

Delete a project column

Get a project card

Get a project column

List project collaborators

List organization projects

List repository projects

Update an existing project card

Update an existing project column

Link to this section Functions

Link to this function

add_collaborator(project_id, username, body, opts \\ [])

View Source
@spec add_collaborator(integer(), String.t(), map() | nil, keyword()) ::
  :ok | {:error, GitHub.Error.t()}

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.

resources

Resources

Link to this function

create_card(column_id, body, opts \\ [])

View Source
@spec create_card(integer(), map(), keyword()) ::
  {:ok, GitHub.Project.Card.t()} | {:error, GitHub.Error.t()}

Create a project card

resources

Resources

Link to this function

create_column(project_id, body, opts \\ [])

View Source
@spec create_column(integer(), map(), keyword()) ::
  {:ok, GitHub.Project.Column.t()} | {:error, GitHub.Error.t()}

Create a project column

Creates a new project column.

resources

Resources

Link to this function

create_for_authenticated_user(body, opts \\ [])

View Source
@spec create_for_authenticated_user(
  map(),
  keyword()
) :: {:ok, GitHub.Project.t()} | {:error, GitHub.Error.t()}

Create a user project

Creates a user project board. Returns a 410 Gone status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.

resources

Resources

Link to this function

create_for_org(org, body, opts \\ [])

View Source
@spec create_for_org(String.t(), map(), keyword()) ::
  {:ok, GitHub.Project.t()} | {:error, GitHub.Error.t()}

Create an organization project

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

resources

Resources

Link to this function

create_for_repo(owner, repo, body, opts \\ [])

View Source
@spec create_for_repo(String.t(), String.t(), map(), keyword()) ::
  {:ok, GitHub.Project.t()} | {:error, GitHub.Error.t()}

Create a repository project

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

resources

Resources

Link to this function

delete(project_id, opts \\ [])

View Source
@spec delete(
  integer(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Delete a project

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

resources

Resources

Link to this function

delete_card(card_id, opts \\ [])

View Source
@spec delete_card(
  integer(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Delete a project card

Deletes a project card

resources

Resources

Link to this function

delete_column(column_id, opts \\ [])

View Source
@spec delete_column(
  integer(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Delete a project column

Deletes a project column.

resources

Resources

Link to this function

get(project_id, opts \\ [])

View Source
@spec get(
  integer(),
  keyword()
) :: {:ok, GitHub.Project.t()} | {:error, GitHub.Error.t()}

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.

resources

Resources

Link to this function

get_card(card_id, opts \\ [])

View Source
@spec get_card(
  integer(),
  keyword()
) :: {:ok, GitHub.Project.Card.t()} | {:error, GitHub.Error.t()}

Get a project card

Gets information about a project card.

resources

Resources

Link to this function

get_column(column_id, opts \\ [])

View Source
@spec get_column(
  integer(),
  keyword()
) :: {:ok, GitHub.Project.Column.t()} | {:error, GitHub.Error.t()}

Get a project column

Gets information about a project column.

resources

Resources

Link to this function

get_permission_for_user(project_id, username, opts \\ [])

View Source
@spec get_permission_for_user(integer(), String.t(), keyword()) ::
  {:ok, GitHub.Project.CollaboratorPermission.t()} | {:error, GitHub.Error.t()}

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.

resources

Resources

Link to this function

list_cards(column_id, opts \\ [])

View Source
@spec list_cards(
  integer(),
  keyword()
) :: {:ok, [GitHub.Project.Card.t()]} | {:error, GitHub.Error.t()}

List project cards

Lists the project cards in a project.

options

Options

  • archived_state: Filters the project cards that are returned by the card's state.
  • per_page: The number of results per page (max 100).
  • page: Page number of the results to fetch.

resources

Resources

Link to this function

list_collaborators(project_id, opts \\ [])

View Source
@spec list_collaborators(
  integer(),
  keyword()
) :: {:ok, [GitHub.User.simple()]} | {:error, GitHub.Error.t()}

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.

options

Options

  • affiliation: Filters the collaborators by their affiliation. outside means outside collaborators of a project that are not a member of the project's organization. direct means collaborators with permissions to a project, regardless of organization membership status. all means all collaborators the authenticated user can see.
  • per_page: The number of results per page (max 100).
  • page: Page number of the results to fetch.

resources

Resources

Link to this function

list_columns(project_id, opts \\ [])

View Source
@spec list_columns(
  integer(),
  keyword()
) :: {:ok, [GitHub.Project.Column.t()]} | {:error, GitHub.Error.t()}

List project columns

Lists the project columns in a project.

options

Options

  • per_page: The number of results per page (max 100).
  • page: Page number of the results to fetch.

resources

Resources

Link to this function

list_for_org(org, opts \\ [])

View Source
@spec list_for_org(
  String.t(),
  keyword()
) :: {:ok, [GitHub.Project.t()]} | {:error, GitHub.Error.t()}

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.

options

Options

  • state: Indicates the state of the projects to return.
  • per_page: The number of results per page (max 100).
  • page: Page number of the results to fetch.

resources

Resources

Link to this function

list_for_repo(owner, repo, opts \\ [])

View Source
@spec list_for_repo(String.t(), String.t(), keyword()) ::
  {:ok, [GitHub.Project.t()]} | {:error, GitHub.Error.t()}

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.

options

Options

  • state: Indicates the state of the projects to return.
  • per_page: The number of results per page (max 100).
  • page: Page number of the results to fetch.

resources

Resources

Link to this function

list_for_user(username, opts \\ [])

View Source
@spec list_for_user(
  String.t(),
  keyword()
) :: {:ok, [GitHub.Project.t()]} | {:error, GitHub.Error.t()}

List user projects

Lists projects for a user.

options

Options

  • state: Indicates the state of the projects to return.
  • per_page: The number of results per page (max 100).
  • page: Page number of the results to fetch.

resources

Resources

Link to this function

move_card(card_id, body, opts \\ [])

View Source
@spec move_card(integer(), map(), keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

Move a project card

resources

Resources

Link to this function

move_column(column_id, body, opts \\ [])

View Source
@spec move_column(integer(), map(), keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

Move a project column

resources

Resources

Link to this function

remove_collaborator(project_id, username, opts \\ [])

View Source
@spec remove_collaborator(integer(), String.t(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

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.

resources

Resources

Link to this function

update(project_id, body, opts \\ [])

View Source
@spec update(integer(), map(), keyword()) ::
  {:ok, GitHub.Project.t()} | {:error, GitHub.Error.t()}

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.

resources

Resources

Link to this function

update_card(card_id, body, opts \\ [])

View Source
@spec update_card(integer(), map(), keyword()) ::
  {:ok, GitHub.Project.Card.t()} | {:error, GitHub.Error.t()}

Update an existing project card

resources

Resources

Link to this function

update_column(column_id, body, opts \\ [])

View Source
@spec update_column(integer(), map(), keyword()) ::
  {:ok, GitHub.Project.Column.t()} | {:error, GitHub.Error.t()}

Update an existing project column

resources

Resources