Description Usage Arguments Details Value Examples
This function updates a project in GitHub. It can be used to change the name and body, but can also be used to close the project, change permissions or add a team.
1 2 3 4 5 6 7 8 9 10 11 12 13 | update_project(
project,
name,
body,
state,
permission,
private,
repo,
user,
team,
org,
...
)
|
project |
(integer or string) Either the project number or name. |
name |
(string, optional) The new name for the project. |
body |
(string, optional) The new description of the project. |
state |
(string, optional) The new state of the project, either |
permission |
(string, optional) The new team or organisation permissions
for the project, either |
private |
(boolean, optional) Whether the project should be private. Note: applies to team and organization projects only. |
repo |
(string, optional) The repository specified in the format:
|
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 |
You can update a project associated with either a repository, user, team or
organization, by supplying them as an input, as long as you have appropriate
permissions. Supplying a team that does not already have access to the
project adds them. If they have access, then the team's permissions can be
changed with the permission
argument.
For more details see the GitHub API documentation:
https://docs.github.com/en/rest/reference/projects#update-a-project
https://docs.github.com/en/rest/reference/teams#add-or-update-team-project-permissions
update_project()
returns a list of the project properties.
Project Properties:
id: The ID of the project.
number: The number of the project for the repository, user or organization.
name: The name given to the project.
body: The description given to the project.
state: Whether the project is "open" or "closed".
private: Whether the project is private (organization and team projects only).
org_permissions: The default permission for organization members (organization and team projects only).
team_permissions: The default permission for team members (team projects only).
creator: The user who created the project.
created_at: When it was created.
updated_at: When it was last updated.
html_url: The URL to view the project.
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 30 31 32 33 34 35 36 37 38 39 40 41 42 | ## Not run:
# Update the name of a project for a repository
update_project(
project = "Repo project",
name = "Updated repo project",
body = "This is an updated repository's project",
repo = "ChadGoymer/githapi"
)
# Update the state of a project for a user
update_project(
name = "User project",
state = "closed",
user = "ChadGoymer"
)
# Update the permissions of a project for an organization
update_project(
name = "Org project",
permission = "read",
private = TRUE,
org = "HairyCoos"
)
# Add a team to the project
update_project(
project = "Org project",
team = "HeadCoos",
org = "HairyCoos"
)
# Update the team's permissions on the project
update_project(
project = "Org project",
permission = "write",
team = "HeadCoos",
org = "HairyCoos"
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.