delete_project: Delete a GitHub project

Description Usage Arguments Details Value Examples

View source: R/projects.R

Description

This function deletes a project in GitHub. Care should be taken as it will not be recoverable. If you just want to close the project use update_project().

Usage

1
delete_project(project, repo, user, team, org, ...)

Arguments

project

(integer or string) Either the project number or name.

repo

(string, optional) The repository specified in the format: owner/repo.

user

(string, optional) The login of the user.

team

(string or integer, optional) The team ID or name.

org

(string, optional) The name of the organization.

...

Parameters passed to gh_request().

Details

You can delete a project associated with either a repository, user, team or organization, by supplying them as an input, as long as you have appropriate permissions. Deleting a team project just removes the team's access. If you want to delete it completely you have to delete the organization's project.

For more details see the GitHub API documentation:

Value

delete_project() returns a TRUE if successfully deleted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Not run: 

  # Delete a project for a repository
  delete_project(
    project = "Repo project",
    repo    = "ChadGoymer/githapi"
  )

  # Delete a project for a user
  delete_project(
    project = "User project",
    user    = "ChadGoymer"
  )

  # Remove a team's access to the organization's project
  delete_project(
    project = "User project",
    team    = "HeadCoos",
    org     = "HairyCoos"
  )

  # Delete a project for an organization
  delete_project(
    project = "User project",
    org     = "HairyCoos"
  )


## End(Not run)

ChadGoymer/githapi documentation built on Oct. 22, 2021, 10:56 a.m.