Description Usage Arguments Details Value Examples
This function creates a new status for a commit in the specified repository
in GitHub. The status can also have a description
and a target URL,
allowing a user to link to more information. The context
allows you to
differentiate the status from others. The status can then be updated, from
pending
to success
say, by using the same context
.
1 2 3 4 5 6 7 8 9 | create_status(
state,
ref,
repo,
description,
target_url,
context = "default",
...
)
|
state |
(string) The state of the status. Can be one of |
ref |
(string) Either a SHA, branch or tag used to identify the commit. |
repo |
(string) The repository specified in the format: |
description |
(string, optional) A short description of the status. |
target_url |
(string, optional) The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. |
context |
(string, optional) A string label to differentiate this status
from the status of other systems. Default: |
... |
Parameters passed to |
For more details see the GitHub API documentation:
create_status()
returns a list of the status's properties.
Status Properties:
id: The id of the status.
state: The state of the status.
description: The description of the status.
target_url: The URL linked to the status.
context: The context of the status.
creator: The creator of the status.
created_at: When it was created.
updated_at: When it was last updated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
# Create a status on the main branch
create_status(
state = "pending",
ref = "main",
repo = "ChadGoymer/test-githapi",
description = "This is a pending status",
target_url = "https://goymer.me/githapi",
context = "test/githapi"
)
# Update the status on the main branch
create_status(
state = "success",
ref = "main",
repo = "ChadGoymer/test-githapi",
description = "This is a success status",
target_url = "https://goymer.me/githapi",
context = "test/githapi"
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.