[−][src]Struct gitlab::Gitlab
A representation of the Gitlab API for a single user.
Separate users should use separate instances of this.
Methods
impl Gitlab
[src]
pub fn new<H, T>(host: H, token: T) -> Result<Self, GitlabError> where
H: AsRef<str>,
T: ToString,
[src]
H: AsRef<str>,
T: ToString,
Create a new Gitlab API representation.
The token
should be a valid personal access token.
Errors out if token
is invalid.
pub fn new_insecure<H, T>(host: H, token: T) -> Result<Self, GitlabError> where
H: AsRef<str>,
T: ToString,
[src]
H: AsRef<str>,
T: ToString,
Create a new non-SSL Gitlab API representation.
Errors out if token
is invalid.
pub fn with_oauth2<H, T>(host: H, token: T) -> Result<Self, GitlabError> where
H: AsRef<str>,
T: ToString,
[src]
H: AsRef<str>,
T: ToString,
Create a new Gitlab API representation.
The token
should be a valid OAuth2 token.
Errors out if token
is invalid.
pub fn with_oauth2_insecure<H, T>(
host: H,
token: T
) -> Result<Self, GitlabError> where
H: AsRef<str>,
T: ToString,
[src]
host: H,
token: T
) -> Result<Self, GitlabError> where
H: AsRef<str>,
T: ToString,
Create a new non-SSL Gitlab API representation.
The token
should be a valid OAuth2 token.
Errors out if token
is invalid.
pub fn builder<H, T>(host: H, token: T) -> GitlabBuilder where
H: ToString,
T: ToString,
[src]
H: ToString,
T: ToString,
Create a new Gitlab API client builder.
pub fn graphql<Q>(
&self,
query: &QueryBody<Q::Variables>
) -> Result<Q::ResponseData, GitlabError> where
Q: GraphQLQuery,
Q::Variables: Debug,
Q::ResponseData: Deserialize<'d>,
[src]
&self,
query: &QueryBody<Q::Variables>
) -> Result<Q::ResponseData, GitlabError> where
Q: GraphQLQuery,
Q::Variables: Debug,
Q::ResponseData: Deserialize<'d>,
Send a GraphQL query.
pub fn current_user(&self) -> Result<UserPublic, GitlabError>
[src]
The user the API is acting as.
pub fn users<T, I, K, V>(&self, params: I) -> Result<Vec<T>, GitlabError> where
T: UserResult,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
T: UserResult,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get all user accounts
pub fn user<T, I, K, V>(
&self,
user: UserId,
params: I
) -> Result<T, GitlabError> where
T: UserResult,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
user: UserId,
params: I
) -> Result<T, GitlabError> where
T: UserResult,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Find a user by id.
pub fn user_by_name<T, N>(&self, name: N) -> Result<T, GitlabError> where
T: UserResult,
N: AsRef<str>,
[src]
T: UserResult,
N: AsRef<str>,
Find a user by username.
pub fn create_project<N: AsRef<str>, P: AsRef<str>>(
&self,
name: N,
path: Option<P>,
params: Option<CreateProjectParams>
) -> Result<Project, GitlabError>
[src]
&self,
name: N,
path: Option<P>,
params: Option<CreateProjectParams>
) -> Result<Project, GitlabError>
Create a project
Arguments:
- name: the name of the project
- path: the path of the project. Optional: name is used if None
- params: optional arguments for project creation
Example
use gitlab::{Gitlab, CreateProjectParams, GitlabBuilder}; let gitlab = GitlabBuilder::new("host", "token").build().unwrap(); let params = CreateProjectParams::builder() .description("Splendid project") .build() .unwrap(); gitlab.create_project("My Project", Some("project"), Some(params));
pub fn create_file<F, B, C, M>(
&self,
project: ProjectId,
file_path: F,
branch: B,
content: C,
commit_message: M
) -> Result<RepoFile, GitlabError> where
F: AsRef<str>,
B: AsRef<str>,
C: AsRef<str>,
M: AsRef<str>,
[src]
&self,
project: ProjectId,
file_path: F,
branch: B,
content: C,
commit_message: M
) -> Result<RepoFile, GitlabError> where
F: AsRef<str>,
B: AsRef<str>,
C: AsRef<str>,
M: AsRef<str>,
Create a new file in repository
pub fn set_project_description<T: AsRef<str>>(
&self,
project: ProjectId,
description: T
) -> Result<Project, GitlabError>
[src]
&self,
project: ProjectId,
description: T
) -> Result<Project, GitlabError>
Set project description
pub fn set_project_default_branch<T: AsRef<str>>(
&self,
project: ProjectId,
branch: T
) -> Result<Project, GitlabError>
[src]
&self,
project: ProjectId,
branch: T
) -> Result<Project, GitlabError>
Set project default branch
pub fn set_project_feature_access_level(
&self,
project: ProjectId,
feature: ProjectFeatures
) -> Result<Project, GitlabError>
[src]
&self,
project: ProjectId,
feature: ProjectFeatures
) -> Result<Project, GitlabError>
Set project features access level
pub fn projects<I, K, V>(&self, params: I) -> Result<Vec<Project>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get all accessible projects.
pub fn owned_projects(&self) -> Result<Vec<Project>, GitlabError>
[src]
Get all owned projects.
pub fn project<I, K, V>(
&self,
project: ProjectId,
params: I
) -> Result<Project, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
params: I
) -> Result<Project, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Find a project by id.
pub fn project_by_name<N, I, K, V>(
&self,
name: N,
params: I
) -> Result<Project, GitlabError> where
N: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
name: N,
params: I
) -> Result<Project, GitlabError> where
N: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Find a project by name.
pub fn environments<I, K, V>(
&self,
project: ProjectId,
params: I
) -> Result<Vec<Environment>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
params: I
) -> Result<Vec<Environment>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get all accessible environments.
pub fn environment<I, K, V>(
&self,
project: ProjectId,
environment: EnvironmentId,
params: I
) -> Result<Environment, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
environment: EnvironmentId,
params: I
) -> Result<Environment, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
pub fn create_group<N: AsRef<str>, P: AsRef<str>>(
&self,
name: N,
path: P,
params: Option<CreateGroupParams>
) -> Result<Group, GitlabError>
[src]
&self,
name: N,
path: P,
params: Option<CreateGroupParams>
) -> Result<Group, GitlabError>
Create a group
Arguments:
- name: the name of the group
- path: the path of the group
- params: optional arguments for group creation
Example
use gitlab::{Gitlab, CreateGroupParams, GitlabBuilder}; let gitlab = GitlabBuilder::new("host", "token").build().unwrap(); let params = CreateGroupParams::builder() .description("A description") .auto_devops_enabled(false) .build() .unwrap(); gitlab.create_group("A group", "A path", Some(params));
pub fn groups<I, K, V>(&self, params: I) -> Result<Vec<Group>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get all accessible groups.
pub fn group_by_name<N>(&self, name: N) -> Result<Group, GitlabError> where
N: AsRef<str>,
[src]
N: AsRef<str>,
Find a group by its name.
pub fn hooks<I, K, V>(
&self,
project: ProjectId,
params: I
) -> Result<Vec<ProjectHook>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
params: I
) -> Result<Vec<ProjectHook>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get a project's hooks.
pub fn hook<I, K, V>(
&self,
project: ProjectId,
hook: HookId,
params: I
) -> Result<ProjectHook, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
hook: HookId,
params: I
) -> Result<ProjectHook, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get a project hook.
pub fn add_hook<U, T>(
&self,
project: ProjectId,
url: U,
enable_ssl_verification: Option<bool>,
token: Option<T>,
events: WebhookEvents
) -> Result<ProjectHook, GitlabError> where
U: AsRef<str>,
T: AsRef<str>,
[src]
&self,
project: ProjectId,
url: U,
enable_ssl_verification: Option<bool>,
token: Option<T>,
events: WebhookEvents
) -> Result<ProjectHook, GitlabError> where
U: AsRef<str>,
T: AsRef<str>,
Add a project hook.
pub fn group_members<I, K, V>(
&self,
group: GroupId,
params: I
) -> Result<Vec<Member>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
group: GroupId,
params: I
) -> Result<Vec<Member>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the team members of a group.
pub fn group_member<I, K, V>(
&self,
group: GroupId,
user: UserId,
params: I
) -> Result<Member, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
group: GroupId,
user: UserId,
params: I
) -> Result<Member, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get a team member of a group.
pub fn project_members<I, K, V>(
&self,
project: ProjectId,
params: I
) -> Result<Vec<Member>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
params: I
) -> Result<Vec<Member>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the team members of a project.
pub fn project_member<I, K, V>(
&self,
project: ProjectId,
user: UserId,
params: I
) -> Result<Member, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
user: UserId,
params: I
) -> Result<Member, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get a team member of a project.
pub fn add_user_to_project(
&self,
project: ProjectId,
user: UserId,
access: AccessLevel
) -> Result<Member, GitlabError>
[src]
&self,
project: ProjectId,
user: UserId,
access: AccessLevel
) -> Result<Member, GitlabError>
Add a user to a project.
pub fn add_user_to_project_by_name<P>(
&self,
project: P,
user: UserId,
access: AccessLevel
) -> Result<Member, GitlabError> where
P: AsRef<str>,
[src]
&self,
project: P,
user: UserId,
access: AccessLevel
) -> Result<Member, GitlabError> where
P: AsRef<str>,
Add a user to a project.
pub fn create_branch<V: AsRef<str>>(
&self,
project: ProjectId,
name: V,
reference: V
) -> Result<RepoBranch, GitlabError>
[src]
&self,
project: ProjectId,
name: V,
reference: V
) -> Result<RepoBranch, GitlabError>
Create a branch for a project
pub fn branches<I, K, V>(
&self,
project: ProjectId,
params: I
) -> Result<Vec<RepoBranch>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
params: I
) -> Result<Vec<RepoBranch>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get branches for a project.
pub fn branch<B, I, K, V>(
&self,
project: ProjectId,
branch: B,
params: I
) -> Result<RepoBranch, GitlabError> where
B: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
branch: B,
params: I
) -> Result<RepoBranch, GitlabError> where
B: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get a branch.
pub fn protect_branch<B: AsRef<str>>(
&self,
project: ProjectId,
branch: B,
push_access_level: Option<AccessLevel>,
merge_access_level: Option<AccessLevel>,
unprotect_access_level: Option<AccessLevel>
) -> Result<ProtectedRepoBranch, GitlabError>
[src]
&self,
project: ProjectId,
branch: B,
push_access_level: Option<AccessLevel>,
merge_access_level: Option<AccessLevel>,
unprotect_access_level: Option<AccessLevel>
) -> Result<ProtectedRepoBranch, GitlabError>
Protect a branch
Arguments
- project: The project id
- branch: The name of the branch or wildcard
- push_access_level: Access level allowed to push (defaults: maintainers)
- merge_access_level: Access level allowed to merge (defaults: maintainers)
- unprotect_access_level: Access level allowed to unproctect (defaults: mainainers)
pub fn commit<C>(
&self,
project: ProjectId,
commit: C
) -> Result<RepoCommitDetail, GitlabError> where
C: AsRef<str>,
[src]
&self,
project: ProjectId,
commit: C
) -> Result<RepoCommitDetail, GitlabError> where
C: AsRef<str>,
Get a commit.
pub fn commit_comments<C, I, K, V>(
&self,
project: ProjectId,
commit: C,
params: I
) -> Result<Vec<CommitNote>, GitlabError> where
C: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
commit: C,
params: I
) -> Result<Vec<CommitNote>, GitlabError> where
C: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get comments on a commit.
pub fn create_commit_comment<C, B>(
&self,
project: ProjectId,
commit: C,
body: B
) -> Result<CommitNote, GitlabError> where
C: AsRef<str>,
B: AsRef<str>,
[src]
&self,
project: ProjectId,
commit: C,
body: B
) -> Result<CommitNote, GitlabError> where
C: AsRef<str>,
B: AsRef<str>,
Get comments on a commit.
pub fn create_commit_comment_by_name<P, C, B>(
&self,
project: P,
commit: C,
body: B
) -> Result<CommitNote, GitlabError> where
P: AsRef<str>,
C: AsRef<str>,
B: AsRef<str>,
[src]
&self,
project: P,
commit: C,
body: B
) -> Result<CommitNote, GitlabError> where
P: AsRef<str>,
C: AsRef<str>,
B: AsRef<str>,
Get comments on a commit.
pub fn create_commit_line_comment(
&self,
project: ProjectId,
commit: &str,
body: &str,
path: &str,
line: u64
) -> Result<CommitNote, GitlabError>
[src]
&self,
project: ProjectId,
commit: &str,
body: &str,
path: &str,
line: u64
) -> Result<CommitNote, GitlabError>
Get comments on a commit.
pub fn commit_latest_statuses<C, I, K, V>(
&self,
project: ProjectId,
commit: C,
params: I
) -> Result<Vec<CommitStatus>, GitlabError> where
C: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
commit: C,
params: I
) -> Result<Vec<CommitStatus>, GitlabError> where
C: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the latest statuses of a commit.
pub fn commit_latest_statuses_by_name<P, C, I, K, V>(
&self,
project: P,
commit: C,
params: I
) -> Result<Vec<CommitStatus>, GitlabError> where
P: AsRef<str>,
C: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: P,
commit: C,
params: I
) -> Result<Vec<CommitStatus>, GitlabError> where
P: AsRef<str>,
C: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the latest statuses of a commit.
pub fn commit_all_statuses<C>(
&self,
project: ProjectId,
commit: C
) -> Result<Vec<CommitStatus>, GitlabError> where
C: AsRef<str>,
[src]
&self,
project: ProjectId,
commit: C
) -> Result<Vec<CommitStatus>, GitlabError> where
C: AsRef<str>,
Get the all statuses of a commit.
pub fn commit_latest_builds<C, I, K, V>(
&self,
project: ProjectId,
commit: C,
params: I
) -> Result<Vec<Job>, GitlabError> where
C: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
commit: C,
params: I
) -> Result<Vec<Job>, GitlabError> where
C: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the latest builds of a commit.
pub fn commit_all_builds<C>(
&self,
project: ProjectId,
commit: C
) -> Result<Vec<Job>, GitlabError> where
C: AsRef<str>,
[src]
&self,
project: ProjectId,
commit: C
) -> Result<Vec<Job>, GitlabError> where
C: AsRef<str>,
Get the all builds of a commit.
pub fn create_commit_status<S>(
&self,
project: ProjectId,
sha: S,
state: StatusState,
info: &CommitStatusInfo
) -> Result<CommitStatus, GitlabError> where
S: AsRef<str>,
[src]
&self,
project: ProjectId,
sha: S,
state: StatusState,
info: &CommitStatusInfo
) -> Result<CommitStatus, GitlabError> where
S: AsRef<str>,
Create a status message for a commit.
pub fn create_commit_status_by_name<P, S>(
&self,
project: P,
sha: S,
state: StatusState,
info: &CommitStatusInfo
) -> Result<CommitStatus, GitlabError> where
P: AsRef<str>,
S: AsRef<str>,
[src]
&self,
project: P,
sha: S,
state: StatusState,
info: &CommitStatusInfo
) -> Result<CommitStatus, GitlabError> where
P: AsRef<str>,
S: AsRef<str>,
Create a status message for a commit.
pub fn labels(&self, project: ProjectId) -> Result<Vec<Label>, GitlabError>
[src]
Get the labels for a project.
pub fn labels_with_counts(
&self,
project: ProjectId
) -> Result<Vec<Label>, GitlabError>
[src]
&self,
project: ProjectId
) -> Result<Vec<Label>, GitlabError>
Get the labels with open/closed/merge requests count
pub fn label(
&self,
project: ProjectId,
label: LabelId
) -> Result<Label, GitlabError>
[src]
&self,
project: ProjectId,
label: LabelId
) -> Result<Label, GitlabError>
Get label by ID.
pub fn issues<I, K, V>(
&self,
project: ProjectId,
params: I
) -> Result<Vec<Issue>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
params: I
) -> Result<Vec<Issue>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the issues for a project.
pub fn issue<I, K, V>(
&self,
project: ProjectId,
issue: IssueInternalId,
params: I
) -> Result<Issue, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
issue: IssueInternalId,
params: I
) -> Result<Issue, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get issues.
pub fn issue_notes<I, K, V>(
&self,
project: ProjectId,
issue: IssueInternalId,
params: I
) -> Result<Vec<Note>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
issue: IssueInternalId,
params: I
) -> Result<Vec<Note>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the notes from a issue.
pub fn issue_notes_by_name<P, I, K, V>(
&self,
project: P,
issue: IssueInternalId,
params: I
) -> Result<Vec<Note>, GitlabError> where
P: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: P,
issue: IssueInternalId,
params: I
) -> Result<Vec<Note>, GitlabError> where
P: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the notes from a issue.
pub fn create_label(
&self,
project: ProjectId,
label: Label
) -> Result<Label, GitlabError>
[src]
&self,
project: ProjectId,
label: Label
) -> Result<Label, GitlabError>
Create a new label
pub fn create_milestone(
&self,
milestone: Milestone
) -> Result<Milestone, GitlabError>
[src]
&self,
milestone: Milestone
) -> Result<Milestone, GitlabError>
Create a new milestone
pub fn create_issue(
&self,
project: ProjectId,
issue: Issue
) -> Result<Issue, GitlabError>
[src]
&self,
project: ProjectId,
issue: Issue
) -> Result<Issue, GitlabError>
Create a new issue
pub fn issue_label_events(
&self,
project: ProjectId,
issue: IssueInternalId
) -> Result<Vec<ResourceLabelEvent>, GitlabError>
[src]
&self,
project: ProjectId,
issue: IssueInternalId
) -> Result<Vec<ResourceLabelEvent>, GitlabError>
Get the resource label events from an issue.
pub fn create_issue_note<C>(
&self,
project: ProjectId,
issue: IssueInternalId,
content: C
) -> Result<Note, GitlabError> where
C: AsRef<str>,
[src]
&self,
project: ProjectId,
issue: IssueInternalId,
content: C
) -> Result<Note, GitlabError> where
C: AsRef<str>,
Create a note on a issue.
pub fn create_issue_note_by_name<P, C>(
&self,
project: P,
issue: IssueInternalId,
content: C
) -> Result<Note, GitlabError> where
P: AsRef<str>,
C: AsRef<str>,
[src]
&self,
project: P,
issue: IssueInternalId,
content: C
) -> Result<Note, GitlabError> where
P: AsRef<str>,
C: AsRef<str>,
Create a note on a issue.
pub fn set_issue_note<C>(
&self,
project: ProjectId,
issue: IssueInternalId,
note: NoteId,
content: C
) -> Result<Note, GitlabError> where
C: AsRef<str>,
[src]
&self,
project: ProjectId,
issue: IssueInternalId,
note: NoteId,
content: C
) -> Result<Note, GitlabError> where
C: AsRef<str>,
Edit a note on an issue.
pub fn merge_requests<I, K, V>(
&self,
project: ProjectId,
params: I
) -> Result<Vec<MergeRequest>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
params: I
) -> Result<Vec<MergeRequest>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the merge requests for a project.
pub fn merge_requests_with_state(
&self,
project: ProjectId,
state: MergeRequestStateFilter
) -> Result<Vec<MergeRequest>, GitlabError>
[src]
&self,
project: ProjectId,
state: MergeRequestStateFilter
) -> Result<Vec<MergeRequest>, GitlabError>
Get the merge requests with a given state.
pub fn create_merge_request(
&self,
project: ProjectId,
params: CreateMergeRequestParams
) -> Result<MergeRequest, GitlabError>
[src]
&self,
project: ProjectId,
params: CreateMergeRequestParams
) -> Result<MergeRequest, GitlabError>
Create a new merge request
pub fn pipelines<I, K, V>(
&self,
project: ProjectId,
params: I
) -> Result<Vec<PipelineBasic>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
params: I
) -> Result<Vec<PipelineBasic>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get all pipelines for a project.
pub fn pipeline(
&self,
project: ProjectId,
id: PipelineId
) -> Result<Pipeline, GitlabError>
[src]
&self,
project: ProjectId,
id: PipelineId
) -> Result<Pipeline, GitlabError>
Get a single pipeline.
pub fn pipeline_variables(
&self,
project: ProjectId,
id: PipelineId
) -> Result<Vec<PipelineVariable>, GitlabError>
[src]
&self,
project: ProjectId,
id: PipelineId
) -> Result<Vec<PipelineVariable>, GitlabError>
Get variables of a pipeline.
pub fn create_pipeline(
&self,
project: ProjectId,
ref_: ObjectId,
variables: &[PipelineVariable]
) -> Result<Pipeline, GitlabError>
[src]
&self,
project: ProjectId,
ref_: ObjectId,
variables: &[PipelineVariable]
) -> Result<Pipeline, GitlabError>
Create a new pipeline.
pub fn retry_pipeline(
&self,
project: ProjectId,
id: PipelineId
) -> Result<Pipeline, GitlabError>
[src]
&self,
project: ProjectId,
id: PipelineId
) -> Result<Pipeline, GitlabError>
Retry jobs in a pipeline.
pub fn cancel_pipeline(
&self,
project: ProjectId,
id: PipelineId
) -> Result<Pipeline, GitlabError>
[src]
&self,
project: ProjectId,
id: PipelineId
) -> Result<Pipeline, GitlabError>
Cancel a pipeline.
pub fn merge_request<I, K, V>(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
params: I
) -> Result<MergeRequest, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
params: I
) -> Result<MergeRequest, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get merge requests.
pub fn merge_request_closes_issues<I, K, V>(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
params: I
) -> Result<Vec<IssueReference>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
params: I
) -> Result<Vec<IssueReference>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the issues that will be closed when a merge request is merged.
pub fn merge_request_discussions<I, K, V>(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
params: I
) -> Result<Vec<Discussion>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
params: I
) -> Result<Vec<Discussion>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the discussions from a merge request.
pub fn merge_request_notes<I, K, V>(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
params: I
) -> Result<Vec<Note>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
params: I
) -> Result<Vec<Note>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the notes from a merge request.
pub fn merge_request_notes_by_name<P, I, K, V>(
&self,
project: P,
merge_request: MergeRequestInternalId,
params: I
) -> Result<Vec<Note>, GitlabError> where
P: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: P,
merge_request: MergeRequestInternalId,
params: I
) -> Result<Vec<Note>, GitlabError> where
P: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the notes from a merge request.
pub fn award_merge_request_note(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
note: NoteId,
award: &str
) -> Result<AwardEmoji, GitlabError>
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
note: NoteId,
award: &str
) -> Result<AwardEmoji, GitlabError>
Award a merge request note with an award.
pub fn award_merge_request_note_by_name<P>(
&self,
project: P,
merge_request: MergeRequestInternalId,
note: NoteId,
award: &str
) -> Result<AwardEmoji, GitlabError> where
P: AsRef<str>,
[src]
&self,
project: P,
merge_request: MergeRequestInternalId,
note: NoteId,
award: &str
) -> Result<AwardEmoji, GitlabError> where
P: AsRef<str>,
Award a merge request note with an award.
pub fn merge_request_awards<I, K, V>(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
params: I
) -> Result<Vec<AwardEmoji>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
params: I
) -> Result<Vec<AwardEmoji>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the awards for a merge request.
pub fn merge_request_awards_by_name<P, I, K, V>(
&self,
project: P,
merge_request: MergeRequestInternalId,
params: I
) -> Result<Vec<AwardEmoji>, GitlabError> where
P: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: P,
merge_request: MergeRequestInternalId,
params: I
) -> Result<Vec<AwardEmoji>, GitlabError> where
P: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the awards for a merge request.
pub fn merge_request_note_awards<I, K, V>(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
note: NoteId,
params: I
) -> Result<Vec<AwardEmoji>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
note: NoteId,
params: I
) -> Result<Vec<AwardEmoji>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the awards for a merge request note.
pub fn merge_request_note_awards_by_name<P, I, K, V>(
&self,
project: P,
merge_request: MergeRequestInternalId,
note: NoteId,
params: I
) -> Result<Vec<AwardEmoji>, GitlabError> where
P: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: P,
merge_request: MergeRequestInternalId,
note: NoteId,
params: I
) -> Result<Vec<AwardEmoji>, GitlabError> where
P: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get the awards for a merge request note.
pub fn merge_request_label_events(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId
) -> Result<Vec<ResourceLabelEvent>, GitlabError>
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId
) -> Result<Vec<ResourceLabelEvent>, GitlabError>
Get the resource label events from a merge request.
pub fn create_merge_request_discussion(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
content: &str
) -> Result<Discussion, GitlabError>
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
content: &str
) -> Result<Discussion, GitlabError>
pub fn create_merge_request_note(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
content: &str
) -> Result<Note, GitlabError>
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
content: &str
) -> Result<Note, GitlabError>
Create a note on a merge request.
pub fn create_merge_request_note_by_name<P>(
&self,
project: P,
merge_request: MergeRequestInternalId,
content: &str
) -> Result<Note, GitlabError> where
P: AsRef<str>,
[src]
&self,
project: P,
merge_request: MergeRequestInternalId,
content: &str
) -> Result<Note, GitlabError> where
P: AsRef<str>,
Create a note on a merge request.
pub fn set_merge_request_note<C>(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
note: NoteId,
content: C
) -> Result<Note, GitlabError> where
C: AsRef<str>,
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
note: NoteId,
content: C
) -> Result<Note, GitlabError> where
C: AsRef<str>,
Edit a note on a merge request.
pub fn modify_merge_request_note<C>(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
note: NoteId,
content: C
) -> Result<Note, GitlabError> where
C: AsRef<str>,
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
note: NoteId,
content: C
) -> Result<Note, GitlabError> where
C: AsRef<str>,
Edit a note on a merge request.
pub fn get_issues_closed_by_merge_request<I, K, V>(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
params: I
) -> Result<Vec<Issue>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
params: I
) -> Result<Vec<Issue>, GitlabError> where
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get issues closed by a merge request.
pub fn get_issues_closed_by_merge_request_by_name<P, I, K, V>(
&self,
project: P,
merge_request: MergeRequestInternalId,
params: I
) -> Result<Vec<Issue>, GitlabError> where
P: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
[src]
&self,
project: P,
merge_request: MergeRequestInternalId,
params: I
) -> Result<Vec<Issue>, GitlabError> where
P: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Get issues closed by a merge request.
pub fn close_issue(
&self,
project: ProjectId,
issue: IssueInternalId
) -> Result<Issue, GitlabError>
[src]
&self,
project: ProjectId,
issue: IssueInternalId
) -> Result<Issue, GitlabError>
Closes an issue
pub fn set_issue_labels<I, L>(
&self,
project: ProjectId,
issue: IssueInternalId,
labels: I
) -> Result<Issue, GitlabError> where
I: IntoIterator<Item = L>,
L: Display,
[src]
&self,
project: ProjectId,
issue: IssueInternalId,
labels: I
) -> Result<Issue, GitlabError> where
I: IntoIterator<Item = L>,
L: Display,
Set the labels on an issue.
pub fn set_issue_labels_by_name<P, I, L>(
&self,
project: P,
issue: IssueInternalId,
labels: I
) -> Result<Issue, GitlabError> where
P: AsRef<str>,
I: IntoIterator<Item = L>,
L: Display,
[src]
&self,
project: P,
issue: IssueInternalId,
labels: I
) -> Result<Issue, GitlabError> where
P: AsRef<str>,
I: IntoIterator<Item = L>,
L: Display,
Set the labels on an issue.
pub fn set_merge_request_labels<I, L>(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
labels: I
) -> Result<MergeRequest, GitlabError> where
I: IntoIterator<Item = L>,
L: Display,
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
labels: I
) -> Result<MergeRequest, GitlabError> where
I: IntoIterator<Item = L>,
L: Display,
Set the labels on a merge request.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Gitlab
impl Send for Gitlab
impl Sync for Gitlab
impl Unpin for Gitlab
impl !UnwindSafe for Gitlab
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,