PullsClient

Struct PullsClient 

Source
pub struct PullsClient { /* private fields */ }
Expand description

Pulls API 客户端

Implementations§

Source§

impl PullsClient

Source

pub fn new(base_url: String, client: Client) -> Self

创建新的 Pulls API 客户端

Source

pub fn with_auth(self, token: &str) -> Self

设置认证信息

Source

pub async fn get_repo_pulls_number_reviews( &self, repo: String, number: String, page: Option<i64>, page_size: Option<i64>, ) -> Result<Value>

查询特定 pull reviews 列表。List pull reviews.

Source

pub async fn post_repo_pulls_number_reviews( &self, repo: String, number: String, post_pull_review_form: Value, ) -> Result<Value>

新增一次 pull request 评审。Create a pull review.

Source

pub async fn get_repo_pulls_number_reviews_review_id_comments( &self, repo: String, number: i64, review_id: i64, page: Option<i64>, page_size: Option<i64>, ) -> Result<Value>

查询指定 Pull Review Comments 列表评论。List pull review comments.

Source

pub async fn get_repo_pulls_number_assignees_assignee( &self, repo: String, number: String, assignee: String, ) -> Result<Value>

检查用户是否可以被添加到 PullRequest 的 Assignees 中。 Checks if a user can be assigned to a pull request.

Source

pub async fn get_repo_pulls_number_labels( &self, repo: String, number: String, page: Option<i64>, page_size: Option<i64>, ) -> Result<Value>

查询 Pull 的标签(label) 列表。List labels for a pull.

Source

pub async fn post_repo_pulls_number_labels( &self, repo: String, number: String, post_pull_labels_form: Value, ) -> Result<Value>

新增 Pull 标签。Add labels to a pull.

Source

pub async fn put_repo_pulls_number_labels( &self, repo: String, number: String, put_pull_labels_form: Value, ) -> Result<Value>

设置 Pull 标签。Set the new labels for a pull.

Source

pub async fn delete_repo_pulls_number_labels( &self, repo: String, number: String, ) -> Result<Value>

清空 Pull 标签。Remove all labels from a pull.

Source

pub async fn get_repo_pulls_number_assignees( &self, repo: String, number: String, ) -> Result<Value>

查询指定 PullRequest 的 Assignees。List repository pull request assignees.

Source

pub async fn post_repo_pulls_number_assignees( &self, repo: String, number: String, post_pull_assignees_form: Value, ) -> Result<Value>

添加 Assignees 到指定的 PullRequest。 Adds up to 10 assignees to a pull request. Users already assigned to an issue are not replaced.

Source

pub async fn delete_repo_pulls_number_assignees( &self, repo: String, number: String, delete_pull_assignees_form: Value, ) -> Result<Value>

删除 PullRequest 中的 Assignees。 Removes one or more assignees from a pull request.

Source

pub async fn put_repo_pulls_number_merge( &self, repo: String, number: String, merge_pull_request_form: Value, ) -> Result<Value>

合并一个 Pull Request。Merge a pull request.

Source

pub async fn post_repo_pulls_number_cherry_pick( &self, repo: String, number: i64, cherry_pick_pull_request_form: Value, ) -> Result<Value>

拣选一个已合并的 Pull Request 的提交到选定的分支

Source

pub async fn get_repo_pulls( &self, repo: String, page: Option<i64>, page_size: Option<i64>, state: Option<String>, authors: Option<String>, reviewers: Option<String>, assignees: Option<String>, base_ref: Option<String>, ) -> Result<Value>

查询 Pull 列表。List pull requests.

Source

pub async fn post_repo_pulls( &self, repo: String, post_pull_form: Value, ) -> Result<Value>

新增一个 Pull。Create a pull request.

Source

pub async fn get_repo_pulls_number( &self, repo: String, number: String, ) -> Result<Value>

查询指定 Pull。Get a pull request.

Source

pub async fn patch_repo_pulls_number( &self, repo: String, number: String, update_pull_request_form: Value, ) -> Result<Value>

更新一个 Pull Request。Update a pull request.

Source

pub async fn delete_repo_pulls_number_labels_name( &self, repo: String, number: String, name: String, ) -> Result<Value>

删除 Pull 标签。Remove a label from a pull.

Source

pub async fn get_repo_pulls_number_comments( &self, repo: String, number: String, page: Option<i64>, page_size: Option<i64>, ) -> Result<Value>

查询 Pull Comments 列表。List pull comments requests.

Source

pub async fn post_repo_pulls_number_comments( &self, repo: String, number: String, post_pull_comment_form: Value, ) -> Result<Value>

新增一个 Pull Comment。Create a pull comment.

Source

pub async fn post_repo_pulls_number_revert( &self, repo: String, number: i64, revert_pull_request_form: Value, ) -> Result<Value>

还原一个已合并的 Pull Request

Source

pub async fn get_repo_pull_in_batch( &self, repo: String, n: Vec<String>, ) -> Result<Value>

根据numbers查询 Pull 列表。List pull requests by numbers.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,