pub struct GithubApiClient {
pub event_name: String,
pub debug_enabled: bool,
/* private fields */
}
Expand description
A structure to work with Github REST API.
Fields§
§event_name: String
The name of the event that was triggered when running cpp_linter.
debug_enabled: bool
The value of the ACTIONS_STEP_DEBUG
environment variable.
Implementations§
Source§impl GithubApiClient
impl GithubApiClient
Sourcepub fn new() -> Result<Self, RestClientError>
pub fn new() -> Result<Self, RestClientError>
Instantiate a GithubApiClient
object.
Sourcepub async fn update_comment(
&self,
url: Url,
options: ThreadCommentOptions,
) -> Result<(), RestClientError>
pub async fn update_comment( &self, url: Url, options: ThreadCommentOptions, ) -> Result<(), RestClientError>
Update existing comment or remove old comment(s) and post a new comment
Trait Implementations§
Source§impl RestApiClient for GithubApiClient
impl RestApiClient for GithubApiClient
Source§fn start_log_group(name: &str)
fn start_log_group(name: &str)
This prints a line to indicate the beginning of a related group of log statements.
Source§fn end_log_group()
fn end_log_group()
This prints a line to indicate the ending of a related group of log statements.
Source§fn make_headers() -> Result<HeaderMap<HeaderValue>, RestClientError>
fn make_headers() -> Result<HeaderMap<HeaderValue>, RestClientError>
A convenience method to create the headers attached to all REST API calls. Read more
Source§async fn post_thread_comment(
&self,
options: ThreadCommentOptions,
) -> Result<(), RestClientError>
async fn post_thread_comment( &self, options: ThreadCommentOptions, ) -> Result<(), RestClientError>
A way to post feedback to the Git server’s GUI. Read more
Source§fn is_pr_event(&self) -> bool
fn is_pr_event(&self) -> bool
Is the current CI event trigger a Pull Request? Read more
Source§fn append_step_summary(comment: &str) -> Result<(), RestClientError>
fn append_step_summary(comment: &str) -> Result<(), RestClientError>
Appends a given comment to the CI workflow’s summary page. Read more
Source§fn write_output_variables(
vars: &[OutputVariable],
) -> Result<(), RestClientError>
fn write_output_variables( vars: &[OutputVariable], ) -> Result<(), RestClientError>
Sets the given
vars
as output variables. Read moreSource§fn make_api_request(
client: &Client,
url: impl IntoUrl,
method: Method,
data: Option<String>,
headers: Option<HeaderMap>,
) -> Result<Request, RestClientError>
fn make_api_request( client: &Client, url: impl IntoUrl, method: Method, data: Option<String>, headers: Option<HeaderMap>, ) -> Result<Request, RestClientError>
Construct a HTTP request to be sent. Read more
Source§fn try_next_page(headers: &HeaderMap) -> Option<Url>
fn try_next_page(headers: &HeaderMap) -> Option<Url>
Gets the URL for the next page in a paginated response. Read more
fn log_response( response: Response, context: &str, ) -> impl Future<Output = ()> + Send
Auto Trait Implementations§
impl Freeze for GithubApiClient
impl !RefUnwindSafe for GithubApiClient
impl Send for GithubApiClient
impl Sync for GithubApiClient
impl Unpin for GithubApiClient
impl !UnwindSafe for GithubApiClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more