Struct octorust::checks::Checks [−][src]
pub struct Checks { /* fields omitted */ }
Implementations
Create a check run.
This function performs a POST
to the /repos/{owner}/{repo}/check-runs
endpoint.
Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests
array.
Creates a new check run for a specific commit in a repository. Your GitHub App must have the checks:write
permission to create check runs.
In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs.
FROM: https://docs.github.com/rest/reference/checks#create-a-check-run
Parameters:
owner: &str
repo: &str
Get a check run.
This function performs a GET
to the /repos/{owner}/{repo}/check-runs/{check_run_id}
endpoint.
Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests
array.
Gets a single check run using its id
. GitHub Apps must have the checks:read
permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the repo
scope to get check runs in a private repository.
FROM: https://docs.github.com/rest/reference/checks#get-a-check-run
Parameters:
owner: &str
repo: &str
check_run_id: i64
– check_run_id parameter.
Update a check run.
This function performs a PATCH
to the /repos/{owner}/{repo}/check-runs/{check_run_id}
endpoint.
Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests
array.
Updates a check run for a specific commit in a repository. Your GitHub App must have the checks:write
permission to edit check runs.
FROM: https://docs.github.com/rest/reference/checks#update-a-check-run
Parameters:
owner: &str
repo: &str
check_run_id: i64
– check_run_id parameter.
pub async fn list_annotations(
&self,
owner: &str,
repo: &str,
check_run_id: i64,
per_page: i64,
page: i64
) -> Result<Vec<CheckAnnotation>>
pub async fn list_annotations(
&self,
owner: &str,
repo: &str,
check_run_id: i64,
per_page: i64,
page: i64
) -> Result<Vec<CheckAnnotation>>
List check run annotations.
This function performs a GET
to the /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations
endpoint.
Lists annotations for a check run using the annotation id
. GitHub Apps must have the checks:read
permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the repo
scope to get annotations for a check run in a private repository.
FROM: https://docs.github.com/rest/reference/checks#list-check-run-annotations
Parameters:
owner: &str
repo: &str
check_run_id: i64
– check_run_id parameter.per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
pub async fn list_all_annotations(
&self,
owner: &str,
repo: &str,
check_run_id: i64
) -> Result<Vec<CheckAnnotation>>
pub async fn list_all_annotations(
&self,
owner: &str,
repo: &str,
check_run_id: i64
) -> Result<Vec<CheckAnnotation>>
List check run annotations.
This function performs a GET
to the /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations
endpoint.
As opposed to list_annotations
, this function returns all the pages of the request at once.
Lists annotations for a check run using the annotation id
. GitHub Apps must have the checks:read
permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the repo
scope to get annotations for a check run in a private repository.
FROM: https://docs.github.com/rest/reference/checks#list-check-run-annotations
pub async fn create_suite(
&self,
owner: &str,
repo: &str,
body: &ChecksCreateSuiteRequest
) -> Result<CheckSuiteData>
pub async fn create_suite(
&self,
owner: &str,
repo: &str,
body: &ChecksCreateSuiteRequest
) -> Result<CheckSuiteData>
Create a check suite.
This function performs a POST
to the /repos/{owner}/{repo}/check-suites
endpoint.
Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests
array and a null
value for head_branch
.
By default, check suites are automatically created when you create a check run. You only need to use this endpoint for manually creating check suites when you’ve disabled automatic creation using “Update repository preferences for check suites”. Your GitHub App must have the checks:write
permission to create check suites.
FROM: https://docs.github.com/rest/reference/checks#create-a-check-suite
Parameters:
owner: &str
repo: &str
pub async fn set_suites_preferences(
&self,
owner: &str,
repo: &str,
body: &ChecksSetSuitesPreferencesRequest
) -> Result<CheckSuitePreference>
pub async fn set_suites_preferences(
&self,
owner: &str,
repo: &str,
body: &ChecksSetSuitesPreferencesRequest
) -> Result<CheckSuitePreference>
Update repository preferences for check suites.
This function performs a PATCH
to the /repos/{owner}/{repo}/check-suites/preferences
endpoint.
Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually Create a check suite. You must have admin permissions in the repository to set preferences for check suites.
FROM: https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites
Parameters:
owner: &str
repo: &str
Get a check suite.
This function performs a GET
to the /repos/{owner}/{repo}/check-suites/{check_suite_id}
endpoint.
Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests
array and a null
value for head_branch
.
Gets a single check suite using its id
. GitHub Apps must have the checks:read
permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the repo
scope to get check suites in a private repository.
FROM: https://docs.github.com/rest/reference/checks#get-a-check-suite
Parameters:
owner: &str
repo: &str
check_suite_id: i64
– check_suite_id parameter.
pub async fn list_for_suite(
&self,
owner: &str,
repo: &str,
check_suite_id: i64,
check_name: &str,
status: JobStatus,
filter: ActionsListJobsWorkflowRunFilter,
per_page: i64,
page: i64
) -> Result<ChecksListRefResponse>
pub async fn list_for_suite(
&self,
owner: &str,
repo: &str,
check_suite_id: i64,
check_name: &str,
status: JobStatus,
filter: ActionsListJobsWorkflowRunFilter,
per_page: i64,
page: i64
) -> Result<ChecksListRefResponse>
List check runs in a check suite.
This function performs a GET
to the /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs
endpoint.
Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests
array.
Lists check runs for a check suite using its id
. GitHub Apps must have the checks:read
permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the repo
scope to get check runs in a private repository.
FROM: https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite
Parameters:
owner: &str
repo: &str
check_suite_id: i64
– check_suite_id parameter.check_name: &str
– Returns check runs with the specifiedname
.status: crate::types::JobStatus
– Returns check runs with the specifiedstatus
. Can be one ofqueued
,in_progress
, orcompleted
.filter: crate::types::ActionsListJobsWorkflowRunFilter
– Filters check runs by theircompleted_at
timestamp. Can be one oflatest
(returning the most recent check runs) orall
.per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
Rerequest a check suite.
This function performs a POST
to the /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest
endpoint.
Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the check_suite
webhook event with the action rerequested
. When a check suite is rerequested
, its status
is reset to queued
and the conclusion
is cleared.
To rerequest a check suite, your GitHub App must have the checks:read
permission on a private repository or pull access to a public repository.
FROM: https://docs.github.com/rest/reference/checks#rerequest-a-check-suite
Parameters:
owner: &str
repo: &str
check_suite_id: i64
– check_suite_id parameter.
pub async fn list_for_ref(
&self,
owner: &str,
repo: &str,
ref_: &str,
check_name: &str,
status: JobStatus,
filter: ActionsListJobsWorkflowRunFilter,
per_page: i64,
page: i64,
app_id: i64
) -> Result<ChecksListRefResponse>
pub async fn list_for_ref(
&self,
owner: &str,
repo: &str,
ref_: &str,
check_name: &str,
status: JobStatus,
filter: ActionsListJobsWorkflowRunFilter,
per_page: i64,
page: i64,
app_id: i64
) -> Result<ChecksListRefResponse>
List check runs for a Git reference.
This function performs a GET
to the /repos/{owner}/{repo}/commits/{ref}/check-runs
endpoint.
Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests
array.
Lists check runs for a commit ref. The ref
can be a SHA, branch name, or a tag name. GitHub Apps must have the checks:read
permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the repo
scope to get check runs in a private repository.
FROM: https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference
Parameters:
owner: &str
repo: &str
ref_: &str
– ref parameter.check_name: &str
– Returns check runs with the specifiedname
.status: crate::types::JobStatus
– Returns check runs with the specifiedstatus
. Can be one ofqueued
,in_progress
, orcompleted
.filter: crate::types::ActionsListJobsWorkflowRunFilter
– Filters check runs by theircompleted_at
timestamp. Can be one oflatest
(returning the most recent check runs) orall
.per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.app_id: i64
List check suites for a Git reference.
This function performs a GET
to the /repos/{owner}/{repo}/commits/{ref}/check-suites
endpoint.
Note: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests
array and a null
value for head_branch
.
Lists check suites for a commit ref
. The ref
can be a SHA, branch name, or a tag name. GitHub Apps must have the checks:read
permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the repo
scope to get check suites in a private repository.
FROM: https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference
Parameters:
owner: &str
repo: &str
ref_: &str
– ref parameter.app_id: i64
– Filters check suites by GitHub Appid
.check_name: &str
– Returns check runs with the specifiedname
.per_page: i64
– Results per page (max 100).page: i64
– Page number of the results to fetch.
Auto Trait Implementations
impl !RefUnwindSafe for Checks
impl !UnwindSafe for Checks