update_card: Update a card in a GitHub project

Description Usage Arguments Details Value Examples

Description

update_card() can be used to change a card's note in a project in GitHub or archive it. move_card() can be used to reorder the cards or move them to other columns.

Usage

1
2
3
update_card(card, note, archived, ...)

move_card(card, position, after, column, project, repo, user, org, ...)

Arguments

card

(integer) The ID of the card.

note

(string, optional) The new note for the card.

archived

(boolean, optional) Whether to archive the card.

...

Parameters passed to gh_request().

position

(string, optional) Either "top" or "bottom".

after

(integer, optional) An ID of another card to place this one after.

column

(integer or string, optional) Either the ID or name of the column.

project

(integer or string) Either the project number or name. Only required if moving the column.

repo

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

user

(string, optional) The login of the user.

org

(string, optional) The name of the organization.

Details

You can update a card associated with either a repository, user or organization, by supplying them as an input, as long as you have appropriate permissions.

You can move a card by either specifying the position, either "top" or "bottom", by specifying another card to place it after, or by specifying a column to move it to.

For more details see the GitHub API documentation:

Value

update_card() returns a list of the card properties.

Card Properties:

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
## Not run: 

  # Update a note in a card
  update_card(card = 123456, note = "This is an updated note")

  # Archive a card
  update_card(card = 654321, archived = TRUE)

  # Move a card to the top of a column
  move_card(card = 123456, position = "top")

  # Move a card after another card
  move_card(card  = 123456, after = 654321)

  # Move card to another column
  move_card(
    card     = 123456,
    position = "top",
    column   = "Test column 2",
    project  = "Test project",
    repo     = "ChadGoymer/githapi"
  )


## End(Not run)

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