repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1 value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1 value |
|---|---|---|---|---|---|---|---|---|---|---|---|
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MergeRequestApi.java | MergeRequestApi.getMergeRequestsStream | public Stream<MergeRequest> getMergeRequestsStream(Object projectIdOrPath, MergeRequestState state) throws GitLabApiException {
return (getMergeRequests(projectIdOrPath, state, getDefaultPerPage()).stream());
} | java | public Stream<MergeRequest> getMergeRequestsStream(Object projectIdOrPath, MergeRequestState state) throws GitLabApiException {
return (getMergeRequests(projectIdOrPath, state, getDefaultPerPage()).stream());
} | [
"public",
"Stream",
"<",
"MergeRequest",
">",
"getMergeRequestsStream",
"(",
"Object",
"projectIdOrPath",
",",
"MergeRequestState",
"state",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getMergeRequests",
"(",
"projectIdOrPath",
",",
"state",
",",
"getDef... | Get all merge requests with a specific state for the specified project as a Stream.
<pre><code>GitLab Endpoint: GET /projects/:id/merge_requests?state=:state</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param state the state parameter can be used to get only merge requests with a given state (opened, closed, or merged) or all of them (all).
@return a Stream with all the merge requests for the specified project
@throws GitLabApiException if any exception occurs | [
"Get",
"all",
"merge",
"requests",
"with",
"a",
"specific",
"state",
"for",
"the",
"specified",
"project",
"as",
"a",
"Stream",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L229-L231 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MergeRequestApi.java | MergeRequestApi.getMergeRequest | public MergeRequest getMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid);
return (response.readEntity(MergeRequest.class));
} | java | public MergeRequest getMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid);
return (response.readEntity(MergeRequest.class));
} | [
"public",
"MergeRequest",
"getMergeRequest",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
",",
"\"projects... | Get information about a single merge request.
<p>NOTE: GitLab API V4 uses IID (internal ID), V3 uses ID to identify the merge request.</p>
<pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_id</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param mergeRequestIid the internal ID of the merge request
@return the specified MergeRequest instance
@throws GitLabApiException if any exception occurs | [
"Get",
"information",
"about",
"a",
"single",
"merge",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L245-L248 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MergeRequestApi.java | MergeRequestApi.getOptionalMergeRequest | public Optional<MergeRequest> getOptionalMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) {
try {
return (Optional.ofNullable(getMergeRequest(projectIdOrPath, mergeRequestIid)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | java | public Optional<MergeRequest> getOptionalMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) {
try {
return (Optional.ofNullable(getMergeRequest(projectIdOrPath, mergeRequestIid)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | [
"public",
"Optional",
"<",
"MergeRequest",
">",
"getOptionalMergeRequest",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
")",
"{",
"try",
"{",
"return",
"(",
"Optional",
".",
"ofNullable",
"(",
"getMergeRequest",
"(",
"projectIdOrPath",
",",
... | Get information about a single merge request as an Optional instance.
<p>NOTE: GitLab API V4 uses IID (internal ID), V3 uses ID to identify the merge request.</p>
<pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_id</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param mergeRequestIid the internal ID of the merge request
@return the specified MergeRequest as an Optional instance instance | [
"Get",
"information",
"about",
"a",
"single",
"merge",
"request",
"as",
"an",
"Optional",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L261-L267 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MergeRequestApi.java | MergeRequestApi.getCommits | public Pager<Commit> getCommits(Object projectIdOrPath, int mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<Commit>(this, Commit.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "commits"));
} | java | public Pager<Commit> getCommits(Object projectIdOrPath, int mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<Commit>(this, Commit.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "commits"));
} | [
"public",
"Pager",
"<",
"Commit",
">",
"getCommits",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"mergeRequestIid",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Commit",
">",
"(",
"this",
",",
"... | Get a Pager of merge request commits.
<p>NOTE: GitLab API V4 uses IID (internal ID), V3 uses ID to identify the merge request.</p>
<pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/commits</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param mergeRequestIid the internal ID of the merge request
@param itemsPerPage the number of Commit instances that will be fetched per page
@return a Pager containing the commits for the specified merge request
@throws GitLabApiException GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"Pager",
"of",
"merge",
"request",
"commits",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L318-L321 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MergeRequestApi.java | MergeRequestApi.getCommitsStream | public Stream<Commit> getCommitsStream(Object projectIdOrPath, int mergeRequestIid) throws GitLabApiException {
return (getCommits(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream());
} | java | public Stream<Commit> getCommitsStream(Object projectIdOrPath, int mergeRequestIid) throws GitLabApiException {
return (getCommits(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream());
} | [
"public",
"Stream",
"<",
"Commit",
">",
"getCommitsStream",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"mergeRequestIid",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getCommits",
"(",
"projectIdOrPath",
",",
"mergeRequestIid",
",",
"getDefaultPerPage"... | Get a Stream of merge request commits.
<p>NOTE: GitLab API V4 uses IID (internal ID), V3 uses ID to identify the merge request.</p>
<pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/commits</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param mergeRequestIid the internal ID of the merge request
@return a Stream containing the commits for the specified merge request
@throws GitLabApiException GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"Stream",
"of",
"merge",
"request",
"commits",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L335-L337 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MergeRequestApi.java | MergeRequestApi.cancelMergeRequest | public MergeRequest cancelMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
}
Response response = put(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "cancel_merge_when_pipeline_succeeds");
return (response.readEntity(MergeRequest.class));
} | java | public MergeRequest cancelMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
}
Response response = put(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "cancel_merge_when_pipeline_succeeds");
return (response.readEntity(MergeRequest.class));
} | [
"public",
"MergeRequest",
"cancelMergeRequest",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"mergeRequestIid",
"==",
"null",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"mergeReques... | Cancel merge when pipeline succeeds. If you don't have permissions to accept this merge request,
you'll get a 401. If the merge request is already merged or closed, you get 405 and
error message 'Method Not Allowed'. In case the merge request is not set to be merged when the
pipeline succeeds, you'll also get a 406 error.
<p>NOTE: GitLab API V4 uses IID (internal ID), V3 uses ID to identify the merge request.</p>
<pre><code>GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param mergeRequestIid the internal ID of the merge request
@return the updated merge request
@throws GitLabApiException if any exception occurs | [
"Cancel",
"merge",
"when",
"pipeline",
"succeeds",
".",
"If",
"you",
"don",
"t",
"have",
"permissions",
"to",
"accept",
"this",
"merge",
"request",
"you",
"ll",
"get",
"a",
"401",
".",
"If",
"the",
"merge",
"request",
"is",
"already",
"merged",
"or",
"cl... | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L674-L682 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MergeRequestApi.java | MergeRequestApi.approveMergeRequest | public MergeRequest approveMergeRequest(Object projectIdOrPath, Integer mergeRequestIid, String sha) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
}
Form formData = new GitLabApiForm().withParam("sha", sha);
Response response = post(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "approve");
return (response.readEntity(MergeRequest.class));
} | java | public MergeRequest approveMergeRequest(Object projectIdOrPath, Integer mergeRequestIid, String sha) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
}
Form formData = new GitLabApiForm().withParam("sha", sha);
Response response = post(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "approve");
return (response.readEntity(MergeRequest.class));
} | [
"public",
"MergeRequest",
"approveMergeRequest",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
",",
"String",
"sha",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"mergeRequestIid",
"==",
"null",
")",
"{",
"throw",
"new",
"RuntimeExcept... | Approve a merge request.
Note: This API endpoint is only available on 8.9 EE and above.
<pre><code>GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/approve</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param mergeRequestIid the internal ID of the merge request
@param sha the HEAD of the merge request, optional
@return a MergeRequest instance with approval information included
@throws GitLabApiException if any exception occurs | [
"Approve",
"a",
"merge",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L719-L728 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MergeRequestApi.java | MergeRequestApi.unapproveMergeRequest | public MergeRequest unapproveMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
}
Response response = post(Response.Status.OK, (Form)null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "unapprove");
return (response.readEntity(MergeRequest.class));
} | java | public MergeRequest unapproveMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
if (mergeRequestIid == null) {
throw new RuntimeException("mergeRequestIid cannot be null");
}
Response response = post(Response.Status.OK, (Form)null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "unapprove");
return (response.readEntity(MergeRequest.class));
} | [
"public",
"MergeRequest",
"unapproveMergeRequest",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"mergeRequestIid",
"==",
"null",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"mergeReq... | Unapprove a merge request.
Note: This API endpoint is only available on 8.9 EE and above.
<pre><code>GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/unapprove</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param mergeRequestIid the internal ID of the merge request
@return a MergeRequest instance with approval information included
@throws GitLabApiException if any exception occurs | [
"Unapprove",
"a",
"merge",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L742-L750 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MergeRequestApi.java | MergeRequestApi.getParticipants | public List<Participant> getParticipants(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
return (getParticipants(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all());
} | java | public List<Participant> getParticipants(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
return (getParticipants(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all());
} | [
"public",
"List",
"<",
"Participant",
">",
"getParticipants",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getParticipants",
"(",
"projectIdOrPath",
",",
"mergeRequestIid",
",",
"getDefa... | Get list of participants of merge request.
<pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/participants</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param mergeRequestIid the IID of the merge request to get
@return a List containing all participants for the specified merge request
@throws GitLabApiException if any exception occurs | [
"Get",
"list",
"of",
"participants",
"of",
"merge",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L777-L779 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MergeRequestApi.java | MergeRequestApi.getParticipants | public Pager<Participant> getParticipants(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return new Pager<Participant>(this, Participant.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "participants");
} | java | public Pager<Participant> getParticipants(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return new Pager<Participant>(this, Participant.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "participants");
} | [
"public",
"Pager",
"<",
"Participant",
">",
"getParticipants",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"new",
"Pager",
"<",
"Participant",
">",
"(",
"this"... | Get a Pager of the participants of merge request.
<pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/participants</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param mergeRequestIid the IID of the merge request to get
@param itemsPerPage the number of Participant instances that will be fetched per page
@return a Pager containing all participants for the specified merge request
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"Pager",
"of",
"the",
"participants",
"of",
"merge",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L810-L813 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MergeRequestApi.java | MergeRequestApi.getParticipantsStream | public Stream<Participant> getParticipantsStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
return (getParticipants(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream());
} | java | public Stream<Participant> getParticipantsStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
return (getParticipants(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream());
} | [
"public",
"Stream",
"<",
"Participant",
">",
"getParticipantsStream",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getParticipants",
"(",
"projectIdOrPath",
",",
"mergeRequestIid",
",",
... | Get Stream of participants of merge request.
<pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/participants</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param mergeRequestIid the IID of the merge request to get
@return a Stream containing all participants for the specified merge request
@throws GitLabApiException if any exception occurs | [
"Get",
"Stream",
"of",
"participants",
"of",
"merge",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L825-L827 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MergeRequestApi.java | MergeRequestApi.getClosesIssues | public List<Issue> getClosesIssues(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
return (getClosesIssues(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all());
} | java | public List<Issue> getClosesIssues(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
return (getClosesIssues(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all());
} | [
"public",
"List",
"<",
"Issue",
">",
"getClosesIssues",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getClosesIssues",
"(",
"projectIdOrPath",
",",
"mergeRequestIid",
",",
"getDefaultPer... | Get list containing all the issues that would be closed by merging the provided merge request.
<pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/closes_issues</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param mergeRequestIid the IID of the merge request to get the closes issues for
@return a List containing all the issues that would be closed by merging the provided merge request
@throws GitLabApiException if any exception occurs | [
"Get",
"list",
"containing",
"all",
"the",
"issues",
"that",
"would",
"be",
"closed",
"by",
"merging",
"the",
"provided",
"merge",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L839-L841 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MergeRequestApi.java | MergeRequestApi.getClosesIssues | public Pager<Issue> getClosesIssues(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return new Pager<Issue>(this, Issue.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "closes_issues");
} | java | public Pager<Issue> getClosesIssues(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return new Pager<Issue>(this, Issue.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "closes_issues");
} | [
"public",
"Pager",
"<",
"Issue",
">",
"getClosesIssues",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"new",
"Pager",
"<",
"Issue",
">",
"(",
"this",
",",
"... | Get a Pager containing all the issues that would be closed by merging the provided merge request.
<pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/closes_issues</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param mergeRequestIid the IID of the merge request to get the closes issues for
@param itemsPerPage the number of Issue instances that will be fetched per page
@return a Pager containing all the issues that would be closed by merging the provided merge request
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"Pager",
"containing",
"all",
"the",
"issues",
"that",
"would",
"be",
"closed",
"by",
"merging",
"the",
"provided",
"merge",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L872-L875 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MergeRequestApi.java | MergeRequestApi.getClosesIssuesStream | public Stream<Issue> getClosesIssuesStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
return (getClosesIssues(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream());
} | java | public Stream<Issue> getClosesIssuesStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
return (getClosesIssues(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream());
} | [
"public",
"Stream",
"<",
"Issue",
">",
"getClosesIssuesStream",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getClosesIssues",
"(",
"projectIdOrPath",
",",
"mergeRequestIid",
",",
"getDe... | Get Stream containing all the issues that would be closed by merging the provided merge request.
<pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/closes_issues</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param mergeRequestIid the IID of the merge request to get the closes issues for
@return a Stream containing all the issues that would be closed by merging the provided merge request
@throws GitLabApiException if any exception occurs | [
"Get",
"Stream",
"containing",
"all",
"the",
"issues",
"that",
"would",
"be",
"closed",
"by",
"merging",
"the",
"provided",
"merge",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L887-L889 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.getIssueDiscussions | public List<Discussion> getIssueDiscussions(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
Pager<Discussion> pager = getIssueDiscussionsPager(projectIdOrPath, issueIid, getDefaultPerPage());
return (pager.all());
} | java | public List<Discussion> getIssueDiscussions(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
Pager<Discussion> pager = getIssueDiscussionsPager(projectIdOrPath, issueIid, getDefaultPerPage());
return (pager.all());
} | [
"public",
"List",
"<",
"Discussion",
">",
"getIssueDiscussions",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"issueIid",
")",
"throws",
"GitLabApiException",
"{",
"Pager",
"<",
"Discussion",
">",
"pager",
"=",
"getIssueDiscussionsPager",
"(",
"projectIdOrPath",
... | Get a list of all discussions for the specified issue.
<pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param issueIid the internal ID of the issue
@return a list containing all the discussions for the specified issue
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"list",
"of",
"all",
"discussions",
"for",
"the",
"specified",
"issue",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L34-L37 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.getIssueDiscussionsPager | public Pager<Discussion> getIssueDiscussionsPager(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "discussions"));
} | java | public Pager<Discussion> getIssueDiscussionsPager(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "discussions"));
} | [
"public",
"Pager",
"<",
"Discussion",
">",
"getIssueDiscussionsPager",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"issueIid",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Discussion",
">",
"(",
... | Get a Pager of Discussion instances for the specified issue.
<pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param issueIid the internal ID of the issue
@param itemsPerPage the number of Discussion instances that will be fetched per page
@return a Pager containing the Discussion instances for the specified issue
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"Pager",
"of",
"Discussion",
"instances",
"for",
"the",
"specified",
"issue",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L71-L74 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.getIssueDiscussionsStream | public Stream<Discussion> getIssueDiscussionsStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
Pager<Discussion> pager = getIssueDiscussionsPager(projectIdOrPath, issueIid, getDefaultPerPage());
return (pager.stream());
} | java | public Stream<Discussion> getIssueDiscussionsStream(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
Pager<Discussion> pager = getIssueDiscussionsPager(projectIdOrPath, issueIid, getDefaultPerPage());
return (pager.stream());
} | [
"public",
"Stream",
"<",
"Discussion",
">",
"getIssueDiscussionsStream",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"issueIid",
")",
"throws",
"GitLabApiException",
"{",
"Pager",
"<",
"Discussion",
">",
"pager",
"=",
"getIssueDiscussionsPager",
"(",
"projectIdO... | Get a Stream of Discussion instances for the specified issue.
<pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param issueIid the internal ID of the issue
@return a Stream instance containing the Discussion instances for the specified issue
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"Stream",
"of",
"Discussion",
"instances",
"for",
"the",
"specified",
"issue",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L86-L89 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.getSnippetDiscussions | public List<Discussion> getSnippetDiscussions(Object projectIdOrPath, Integer snippetId) throws GitLabApiException {
Pager<Discussion> pager = getSnippetDiscussionsPager(projectIdOrPath, snippetId, getDefaultPerPage());
return (pager.all());
} | java | public List<Discussion> getSnippetDiscussions(Object projectIdOrPath, Integer snippetId) throws GitLabApiException {
Pager<Discussion> pager = getSnippetDiscussionsPager(projectIdOrPath, snippetId, getDefaultPerPage());
return (pager.all());
} | [
"public",
"List",
"<",
"Discussion",
">",
"getSnippetDiscussions",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"snippetId",
")",
"throws",
"GitLabApiException",
"{",
"Pager",
"<",
"Discussion",
">",
"pager",
"=",
"getSnippetDiscussionsPager",
"(",
"projectIdOrPa... | Get a list of all discussions for the specified snippet.
<pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param snippetId the ID of the snippet
@return a list containing all the discussions for the specified snippet
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"list",
"of",
"all",
"discussions",
"for",
"the",
"specified",
"snippet",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L101-L104 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.getSnippetDiscussionsPager | public Pager<Discussion> getSnippetDiscussionsPager(Object projectIdOrPath, Integer snippetId, int itemsPerPage) throws GitLabApiException {
return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "discussions"));
} | java | public Pager<Discussion> getSnippetDiscussionsPager(Object projectIdOrPath, Integer snippetId, int itemsPerPage) throws GitLabApiException {
return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "discussions"));
} | [
"public",
"Pager",
"<",
"Discussion",
">",
"getSnippetDiscussionsPager",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"snippetId",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Discussion",
">",
"("... | Get a Pager of Discussion instances for the specified snippet.
<pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param snippetId the ID of the snippet
@param itemsPerPage the number of Discussion instances that will be fetched per page
@return a Pager containing the Discussion instances for the specified snippet
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"Pager",
"of",
"Discussion",
"instances",
"for",
"the",
"specified",
"snippet",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L138-L141 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.getSnippetDiscussionsStream | public Stream<Discussion> getSnippetDiscussionsStream(Object projectIdOrPath, Integer snippetId) throws GitLabApiException {
Pager<Discussion> pager = getSnippetDiscussionsPager(projectIdOrPath, snippetId, getDefaultPerPage());
return (pager.stream());
} | java | public Stream<Discussion> getSnippetDiscussionsStream(Object projectIdOrPath, Integer snippetId) throws GitLabApiException {
Pager<Discussion> pager = getSnippetDiscussionsPager(projectIdOrPath, snippetId, getDefaultPerPage());
return (pager.stream());
} | [
"public",
"Stream",
"<",
"Discussion",
">",
"getSnippetDiscussionsStream",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"snippetId",
")",
"throws",
"GitLabApiException",
"{",
"Pager",
"<",
"Discussion",
">",
"pager",
"=",
"getSnippetDiscussionsPager",
"(",
"proje... | Get a Stream of Discussion instances for the specified snippet.
<pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param snippetId the ID of the snippet
@return a Stream instance containing the Discussion instances for the specified snippet
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"Stream",
"of",
"Discussion",
"instances",
"for",
"the",
"specified",
"snippet",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L153-L156 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.getEpicDiscussions | public List<Discussion> getEpicDiscussions(Object projectIdOrPath, Integer epicId) throws GitLabApiException {
Pager<Discussion> pager = getEpicDiscussionsPager(projectIdOrPath, epicId, getDefaultPerPage());
return (pager.all());
} | java | public List<Discussion> getEpicDiscussions(Object projectIdOrPath, Integer epicId) throws GitLabApiException {
Pager<Discussion> pager = getEpicDiscussionsPager(projectIdOrPath, epicId, getDefaultPerPage());
return (pager.all());
} | [
"public",
"List",
"<",
"Discussion",
">",
"getEpicDiscussions",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"epicId",
")",
"throws",
"GitLabApiException",
"{",
"Pager",
"<",
"Discussion",
">",
"pager",
"=",
"getEpicDiscussionsPager",
"(",
"projectIdOrPath",
",... | Get a list of all discussions for the specified epic.
<pre><code>GitLab Endpoint: GET /projects/:id/epics/:epic_id/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param epicId the internal ID of the epic
@return a list containing all the discussions for the specified epic
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"list",
"of",
"all",
"discussions",
"for",
"the",
"specified",
"epic",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L169-L172 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.getEpicDiscussionsPager | public Pager<Discussion> getEpicDiscussionsPager(Object projectIdOrPath, Integer epicId, int itemsPerPage) throws GitLabApiException {
return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "epics", epicId, "discussions"));
} | java | public Pager<Discussion> getEpicDiscussionsPager(Object projectIdOrPath, Integer epicId, int itemsPerPage) throws GitLabApiException {
return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "epics", epicId, "discussions"));
} | [
"public",
"Pager",
"<",
"Discussion",
">",
"getEpicDiscussionsPager",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"epicId",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Discussion",
">",
"(",
"t... | Get a Pager of Discussion instances for the specified epic.
<pre><code>GitLab Endpoint: GET /projects/:id/epics/:epic_id/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param epicId the internal ID of the epic
@param itemsPerPage the number of Discussion instances that will be fetched per page
@return a Pager containing the Discussion instances for the specified epic
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"Pager",
"of",
"Discussion",
"instances",
"for",
"the",
"specified",
"epic",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L206-L209 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.getEpicDiscussionsStream | public Stream<Discussion> getEpicDiscussionsStream(Object projectIdOrPath, Integer epicId) throws GitLabApiException {
Pager<Discussion> pager = getEpicDiscussionsPager(projectIdOrPath, epicId, getDefaultPerPage());
return (pager.stream());
} | java | public Stream<Discussion> getEpicDiscussionsStream(Object projectIdOrPath, Integer epicId) throws GitLabApiException {
Pager<Discussion> pager = getEpicDiscussionsPager(projectIdOrPath, epicId, getDefaultPerPage());
return (pager.stream());
} | [
"public",
"Stream",
"<",
"Discussion",
">",
"getEpicDiscussionsStream",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"epicId",
")",
"throws",
"GitLabApiException",
"{",
"Pager",
"<",
"Discussion",
">",
"pager",
"=",
"getEpicDiscussionsPager",
"(",
"projectIdOrPat... | Get a Stream of Discussion instances for the specified epic.
<pre><code>GitLab Endpoint: GET /projects/:id/epics/:epic_id/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param epicId the internal ID of the epic
@return a Stream instance containing the Discussion instances for the specified epic
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"Stream",
"of",
"Discussion",
"instances",
"for",
"the",
"specified",
"epic",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L221-L224 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.getMergeRequestDiscussions | public List<Discussion> getMergeRequestDiscussions(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
Pager<Discussion> pager = getMergeRequestDiscussionsPager(projectIdOrPath, mergeRequestIid, getDefaultPerPage());
return (pager.all());
} | java | public List<Discussion> getMergeRequestDiscussions(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
Pager<Discussion> pager = getMergeRequestDiscussionsPager(projectIdOrPath, mergeRequestIid, getDefaultPerPage());
return (pager.all());
} | [
"public",
"List",
"<",
"Discussion",
">",
"getMergeRequestDiscussions",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
")",
"throws",
"GitLabApiException",
"{",
"Pager",
"<",
"Discussion",
">",
"pager",
"=",
"getMergeRequestDiscussionsPager",
"(",
... | Get a list of all discussions for the specified merge request.
<pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param mergeRequestIid the internal ID of the merge request
@return a list containing all the discussions for the specified merge request
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"list",
"of",
"all",
"discussions",
"for",
"the",
"specified",
"merge",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L236-L239 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.getMergeRequestDiscussionsPager | public Pager<Discussion> getMergeRequestDiscussionsPager(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "discussions"));
} | java | public Pager<Discussion> getMergeRequestDiscussionsPager(Object projectIdOrPath, Integer mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "discussions"));
} | [
"public",
"Pager",
"<",
"Discussion",
">",
"getMergeRequestDiscussionsPager",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Discussion",
... | Get a Pager of Discussion instances for the specified merge request.
<pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param mergeRequestIid the internal ID of the merge request
@param itemsPerPage the number of Discussion instances that will be fetched per page
@return a Pager containing the Discussion instances for the specified merge request
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"Pager",
"of",
"Discussion",
"instances",
"for",
"the",
"specified",
"merge",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L273-L276 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.getMergeRequestDiscussionsStream | public Stream<Discussion> getMergeRequestDiscussionsStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
Pager<Discussion> pager = getMergeRequestDiscussionsPager(projectIdOrPath, mergeRequestIid, getDefaultPerPage());
return (pager.stream());
} | java | public Stream<Discussion> getMergeRequestDiscussionsStream(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
Pager<Discussion> pager = getMergeRequestDiscussionsPager(projectIdOrPath, mergeRequestIid, getDefaultPerPage());
return (pager.stream());
} | [
"public",
"Stream",
"<",
"Discussion",
">",
"getMergeRequestDiscussionsStream",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
")",
"throws",
"GitLabApiException",
"{",
"Pager",
"<",
"Discussion",
">",
"pager",
"=",
"getMergeRequestDiscussionsPager",... | Get a Stream of Discussion instances for the specified merge request.
<pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param mergeRequestIid the internal ID of the merge request
@return a Stream instance containing the Discussion instances for the specified issue
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"Stream",
"of",
"Discussion",
"instances",
"for",
"the",
"specified",
"merge",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L288-L291 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.resolveMergeRequestDiscussion | public Discussion resolveMergeRequestDiscussion(Object projectIdOrPath, Integer mergeRequestIid,
Integer discussionId, Boolean resolved) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("resolved", resolved, true);
Response response = put(Response.Status.OK, formData.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "discussions");
return (response.readEntity(Discussion.class));
} | java | public Discussion resolveMergeRequestDiscussion(Object projectIdOrPath, Integer mergeRequestIid,
Integer discussionId, Boolean resolved) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("resolved", resolved, true);
Response response = put(Response.Status.OK, formData.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "discussions");
return (response.readEntity(Discussion.class));
} | [
"public",
"Discussion",
"resolveMergeRequestDiscussion",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
",",
"Integer",
"discussionId",
",",
"Boolean",
"resolved",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"... | Resolve or unresolve whole discussion of a merge request.
<pre><code>GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param mergeRequestIid mergeRequestIid the internal ID of the merge request
@param discussionId the ID of a discussion
@param resolved resolve/unresolve the discussion
@return the updated DIscussion instance
@throws GitLabApiException if any exception occurs during execution | [
"Resolve",
"or",
"unresolve",
"whole",
"discussion",
"of",
"a",
"merge",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L349-L355 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.deleteMergeRequestDiscussionNote | public void deleteMergeRequestDiscussionNote(Object projectIdOrPath, Integer mergeRequestIid,
Integer discussionId, Integer noteId) throws GitLabApiException {
delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath),
"merge_requests", mergeRequestIid, "discussions", noteId);
} | java | public void deleteMergeRequestDiscussionNote(Object projectIdOrPath, Integer mergeRequestIid,
Integer discussionId, Integer noteId) throws GitLabApiException {
delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath),
"merge_requests", mergeRequestIid, "discussions", noteId);
} | [
"public",
"void",
"deleteMergeRequestDiscussionNote",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
",",
"Integer",
"discussionId",
",",
"Integer",
"noteId",
")",
"throws",
"GitLabApiException",
"{",
"delete",
"(",
"Response",
".",
"Status",
"."... | Deletes an existing discussion note of a merge request.
<pre><code>GitLab Endpoint: DELETE /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes/:note_id</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param mergeRequestIid mergeRequestIid the internal ID of the merge request
@param discussionId the ID of a discussion
@param noteId the note ID to delete
@throws GitLabApiException if any exception occurs during execution | [
"Deletes",
"an",
"existing",
"discussion",
"note",
"of",
"a",
"merge",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L368-L372 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.getCommitDiscussions | public List<Discussion> getCommitDiscussions(Object projectIdOrPath, Integer commitId) throws GitLabApiException {
Pager<Discussion> pager = getCommitDiscussionsPager(projectIdOrPath, commitId, getDefaultPerPage());
return (pager.all());
} | java | public List<Discussion> getCommitDiscussions(Object projectIdOrPath, Integer commitId) throws GitLabApiException {
Pager<Discussion> pager = getCommitDiscussionsPager(projectIdOrPath, commitId, getDefaultPerPage());
return (pager.all());
} | [
"public",
"List",
"<",
"Discussion",
">",
"getCommitDiscussions",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"commitId",
")",
"throws",
"GitLabApiException",
"{",
"Pager",
"<",
"Discussion",
">",
"pager",
"=",
"getCommitDiscussionsPager",
"(",
"projectIdOrPath"... | Get a list of all discussions for the specified commit.
<pre><code>GitLab Endpoint: GET /projects/:id/commits/:commit_id/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param commitId the internal ID of the commit
@return a list containing all the discussions for the specified commit
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"list",
"of",
"all",
"discussions",
"for",
"the",
"specified",
"commit",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L384-L387 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.getCommitDiscussions | public List<Discussion> getCommitDiscussions(Object projectIdOrPath, Integer commitId, int maxItems) throws GitLabApiException {
if (maxItems < 1) {
return (getCommitDiscussions(projectIdOrPath, commitId));
} else {
Response response = get(Response.Status.OK, getPerPageQueryParam(maxItems),
"projects", getProjectIdOrPath(projectIdOrPath), "commits", commitId, "discussions");
return (response.readEntity(new GenericType<List<Discussion>>() {}));
}
} | java | public List<Discussion> getCommitDiscussions(Object projectIdOrPath, Integer commitId, int maxItems) throws GitLabApiException {
if (maxItems < 1) {
return (getCommitDiscussions(projectIdOrPath, commitId));
} else {
Response response = get(Response.Status.OK, getPerPageQueryParam(maxItems),
"projects", getProjectIdOrPath(projectIdOrPath), "commits", commitId, "discussions");
return (response.readEntity(new GenericType<List<Discussion>>() {}));
}
} | [
"public",
"List",
"<",
"Discussion",
">",
"getCommitDiscussions",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"commitId",
",",
"int",
"maxItems",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"maxItems",
"<",
"1",
")",
"{",
"return",
"(",
"getComm... | Get a list of discussions for the specified commit.
<pre><code>GitLab Endpoint: GET /projects/:id/commits/:commit_id/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param commitId the internal ID of the commit
@param maxItems the maximum number of Discussion instances to get, if < 1 will fetch all Discussion instances for the commit
@return a list containing the discussions for the specified commit
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"list",
"of",
"discussions",
"for",
"the",
"specified",
"commit",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L400-L408 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.getCommitDiscussionsPager | public Pager<Discussion> getCommitDiscussionsPager(Object projectIdOrPath, Integer commitId, int itemsPerPage) throws GitLabApiException {
return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "commits", commitId, "discussions"));
} | java | public Pager<Discussion> getCommitDiscussionsPager(Object projectIdOrPath, Integer commitId, int itemsPerPage) throws GitLabApiException {
return (new Pager<Discussion>(this, Discussion.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "commits", commitId, "discussions"));
} | [
"public",
"Pager",
"<",
"Discussion",
">",
"getCommitDiscussionsPager",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"commitId",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Discussion",
">",
"(",
... | Get a Pager of Discussion instances for the specified commit.
<pre><code>GitLab Endpoint: GET /projects/:id/commits/:commit_id/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param commitId the internal ID of the commit
@param itemsPerPage the number of Discussion instances that will be fetched per page
@return a Pager containing the Discussion instances for the specified commit
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"Pager",
"of",
"Discussion",
"instances",
"for",
"the",
"specified",
"commit",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L421-L424 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/DiscussionsApi.java | DiscussionsApi.getCommitDiscussionsStream | public Stream<Discussion> getCommitDiscussionsStream(Object projectIdOrPath, Integer commitId) throws GitLabApiException {
Pager<Discussion> pager = getCommitDiscussionsPager(projectIdOrPath, commitId, getDefaultPerPage());
return (pager.stream());
} | java | public Stream<Discussion> getCommitDiscussionsStream(Object projectIdOrPath, Integer commitId) throws GitLabApiException {
Pager<Discussion> pager = getCommitDiscussionsPager(projectIdOrPath, commitId, getDefaultPerPage());
return (pager.stream());
} | [
"public",
"Stream",
"<",
"Discussion",
">",
"getCommitDiscussionsStream",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"commitId",
")",
"throws",
"GitLabApiException",
"{",
"Pager",
"<",
"Discussion",
">",
"pager",
"=",
"getCommitDiscussionsPager",
"(",
"projectI... | Get a Stream of Discussion instances for the specified commit.
<pre><code>GitLab Endpoint: GET /projects/:id/commits/:commit_id/discussions</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param commitId the internal ID of the commit
@return a Stream instance containing the Discussion instances for the specified commit
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"a",
"Stream",
"of",
"Discussion",
"instances",
"for",
"the",
"specified",
"commit",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DiscussionsApi.java#L436-L439 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryFileApi.java | RepositoryFileApi.getOptionalFileInfo | public Optional<RepositoryFile> getOptionalFileInfo(Object projectIdOrPath, String filePath, String ref) {
try {
return (Optional.ofNullable(getFileInfo(projectIdOrPath, filePath, ref)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | java | public Optional<RepositoryFile> getOptionalFileInfo(Object projectIdOrPath, String filePath, String ref) {
try {
return (Optional.ofNullable(getFileInfo(projectIdOrPath, filePath, ref)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | [
"public",
"Optional",
"<",
"RepositoryFile",
">",
"getOptionalFileInfo",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"filePath",
",",
"String",
"ref",
")",
"{",
"try",
"{",
"return",
"(",
"Optional",
".",
"ofNullable",
"(",
"getFileInfo",
"(",
"projectIdOrP... | Get an Optional instance with the value holding information on a file in the repository.
Allows you to receive information about file in repository like name, size.
Only works with GitLab 11.1.0+, value will be an empty object for earlier versions of GitLab.
<pre><code>GitLab Endpoint: HEAD /projects/:id/repository/files</code></pre>
@param projectIdOrPath the id, path of the project, or a Project instance holding the project ID or path
@param filePath (required) - Full path to the file. Ex. lib/class.rb
@param ref (required) - The name of branch, tag or commit
@return an Optional instance with the specified RepositoryFile as a value
@since GitLab-11.1.0 | [
"Get",
"an",
"Optional",
"instance",
"with",
"the",
"value",
"holding",
"information",
"on",
"a",
"file",
"in",
"the",
"repository",
".",
"Allows",
"you",
"to",
"receive",
"information",
"about",
"file",
"in",
"repository",
"like",
"name",
"size",
".",
"Only... | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryFileApi.java#L39-L45 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryFileApi.java | RepositoryFileApi.getFileInfo | public RepositoryFile getFileInfo(Object projectIdOrPath, String filePath, String ref) throws GitLabApiException {
Form form = new Form();
addFormParam(form, "ref", ref, true);
Response response = head(Response.Status.OK, form.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "files", urlEncode(filePath));
RepositoryFile file = new RepositoryFile();
file.setBlobId(response.getHeaderString("X-Gitlab-Blob-Id"));
file.setCommitId(response.getHeaderString("X-Gitlab-Commit-Id"));
file.setEncoding(response.getHeaderString("X-Gitlab-Encoding"));
file.setFileName(response.getHeaderString("X-Gitlab-File-Name"));
file.setFilePath(response.getHeaderString("X-Gitlab-File-Path"));
file.setLastCommitId(response.getHeaderString("X-Gitlab-Last-Commit-Id"));
file.setRef(response.getHeaderString("X-Gitlab-Ref"));
String sizeStr = response.getHeaderString("X-Gitlab-Size");
file.setSize(sizeStr != null ? Integer.valueOf(sizeStr) : -1);
return (file);
} | java | public RepositoryFile getFileInfo(Object projectIdOrPath, String filePath, String ref) throws GitLabApiException {
Form form = new Form();
addFormParam(form, "ref", ref, true);
Response response = head(Response.Status.OK, form.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "files", urlEncode(filePath));
RepositoryFile file = new RepositoryFile();
file.setBlobId(response.getHeaderString("X-Gitlab-Blob-Id"));
file.setCommitId(response.getHeaderString("X-Gitlab-Commit-Id"));
file.setEncoding(response.getHeaderString("X-Gitlab-Encoding"));
file.setFileName(response.getHeaderString("X-Gitlab-File-Name"));
file.setFilePath(response.getHeaderString("X-Gitlab-File-Path"));
file.setLastCommitId(response.getHeaderString("X-Gitlab-Last-Commit-Id"));
file.setRef(response.getHeaderString("X-Gitlab-Ref"));
String sizeStr = response.getHeaderString("X-Gitlab-Size");
file.setSize(sizeStr != null ? Integer.valueOf(sizeStr) : -1);
return (file);
} | [
"public",
"RepositoryFile",
"getFileInfo",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"filePath",
",",
"String",
"ref",
")",
"throws",
"GitLabApiException",
"{",
"Form",
"form",
"=",
"new",
"Form",
"(",
")",
";",
"addFormParam",
"(",
"form",
",",
"\"ref\... | Get information on a file in the repository. Allows you to receive information about file in repository like name, size.
Only works with GitLab 11.1.0+, returns an empty object for earlier versions of GitLab.
<pre><code>GitLab Endpoint: HEAD /projects/:id/repository/files</code></pre>
@param projectIdOrPath the id, path of the project, or a Project instance holding the project ID or path
@param filePath (required) - Full path to the file. Ex. lib/class.rb
@param ref (required) - The name of branch, tag or commit
@return a RepositoryFile instance with the file info
@throws GitLabApiException if any exception occurs
@since GitLab-11.1.0 | [
"Get",
"information",
"on",
"a",
"file",
"in",
"the",
"repository",
".",
"Allows",
"you",
"to",
"receive",
"information",
"about",
"file",
"in",
"repository",
"like",
"name",
"size",
".",
"Only",
"works",
"with",
"GitLab",
"11",
".",
"1",
".",
"0",
"+",
... | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryFileApi.java#L60-L80 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryFileApi.java | RepositoryFileApi.getOptionalFile | public Optional<RepositoryFile> getOptionalFile(Object projectIdOrPath, String filePath, String ref) {
try {
return (Optional.ofNullable(getFile(projectIdOrPath, filePath, ref, true)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | java | public Optional<RepositoryFile> getOptionalFile(Object projectIdOrPath, String filePath, String ref) {
try {
return (Optional.ofNullable(getFile(projectIdOrPath, filePath, ref, true)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | [
"public",
"Optional",
"<",
"RepositoryFile",
">",
"getOptionalFile",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"filePath",
",",
"String",
"ref",
")",
"{",
"try",
"{",
"return",
"(",
"Optional",
".",
"ofNullable",
"(",
"getFile",
"(",
"projectIdOrPath",
... | Get an Optional instance with the value holding information and content for a file in the repository.
Allows you to receive information about file in repository like name, size, and content.
Only works with GitLab 11.1.0+, value will be an empty object for earlier versions of GitLab.
<pre><code>GitLab Endpoint: HEAD /projects/:id/repository/files</code></pre>
@param projectIdOrPath the id, path of the project, or a Project instance holding the project ID or path
@param filePath (required) - Full path to the file. Ex. lib/class.rb
@param ref (required) - The name of branch, tag or commit
@return an Optional instance with the specified RepositoryFile as a value | [
"Get",
"an",
"Optional",
"instance",
"with",
"the",
"value",
"holding",
"information",
"and",
"content",
"for",
"a",
"file",
"in",
"the",
"repository",
".",
"Allows",
"you",
"to",
"receive",
"information",
"about",
"file",
"in",
"repository",
"like",
"name",
... | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryFileApi.java#L94-L100 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryFileApi.java | RepositoryFileApi.getFile | public RepositoryFile getFile(Object projectIdOrPath, String filePath, String ref, boolean includeContent) throws GitLabApiException {
if (!includeContent) {
return (getFileInfo(projectIdOrPath, filePath, ref));
}
Form form = new Form();
addFormParam(form, "ref", ref, true);
Response response = get(Response.Status.OK, form.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "repository", "files", urlEncode(filePath));
return (response.readEntity(RepositoryFile.class));
} | java | public RepositoryFile getFile(Object projectIdOrPath, String filePath, String ref, boolean includeContent) throws GitLabApiException {
if (!includeContent) {
return (getFileInfo(projectIdOrPath, filePath, ref));
}
Form form = new Form();
addFormParam(form, "ref", ref, true);
Response response = get(Response.Status.OK, form.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "repository", "files", urlEncode(filePath));
return (response.readEntity(RepositoryFile.class));
} | [
"public",
"RepositoryFile",
"getFile",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"filePath",
",",
"String",
"ref",
",",
"boolean",
"includeContent",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"!",
"includeContent",
")",
"{",
"return",
"(",
"getF... | Get file from repository. Allows you to receive information about file in repository like name, size, and optionally content.
Note that file content is Base64 encoded.
<pre><code>GitLab Endpoint: GET /projects/:id/repository/files</code></pre>
@param projectIdOrPath the id, path of the project, or a Project instance holding the project ID or path
@param filePath (required) - Full path to the file. Ex. lib/class.rb
@param ref (required) - The name of branch, tag or commit
@param includeContent if true will also fetch file content
@return a RepositoryFile instance with the file info and optionally file content
@throws GitLabApiException if any exception occurs | [
"Get",
"file",
"from",
"repository",
".",
"Allows",
"you",
"to",
"receive",
"information",
"about",
"file",
"in",
"repository",
"like",
"name",
"size",
"and",
"optionally",
"content",
".",
"Note",
"that",
"file",
"content",
"is",
"Base64",
"encoded",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryFileApi.java#L154-L164 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryFileApi.java | RepositoryFileApi.createFile | public RepositoryFile createFile(Object projectIdOrPath, RepositoryFile file, String branchName, String commitMessage) throws GitLabApiException {
Form formData = createForm(file, branchName, commitMessage);
Response response;
if (isApiVersion(ApiVersion.V3)) {
response = post(Response.Status.CREATED, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "files");
} else {
response = post(Response.Status.CREATED, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "files", urlEncode(file.getFilePath()));
}
return (response.readEntity(RepositoryFile.class));
} | java | public RepositoryFile createFile(Object projectIdOrPath, RepositoryFile file, String branchName, String commitMessage) throws GitLabApiException {
Form formData = createForm(file, branchName, commitMessage);
Response response;
if (isApiVersion(ApiVersion.V3)) {
response = post(Response.Status.CREATED, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "files");
} else {
response = post(Response.Status.CREATED, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "files", urlEncode(file.getFilePath()));
}
return (response.readEntity(RepositoryFile.class));
} | [
"public",
"RepositoryFile",
"createFile",
"(",
"Object",
"projectIdOrPath",
",",
"RepositoryFile",
"file",
",",
"String",
"branchName",
",",
"String",
"commitMessage",
")",
"throws",
"GitLabApiException",
"{",
"Form",
"formData",
"=",
"createForm",
"(",
"file",
",",... | Create new file in repository
<pre><code>GitLab Endpoint: POST /projects/:id/repository/files</code></pre>
file_path (required) - Full path to new file. Ex. lib/class.rb
branch_name (required) - The name of branch
encoding (optional) - 'text' or 'base64'. Text is default.
content (required) - File content
commit_message (required) - Commit message
@param projectIdOrPath the id, path of the project, or a Project instance holding the project ID or path
@param file a ReposityoryFile instance with info for the file to create
@param branchName the name of branch
@param commitMessage the commit message
@return a RepositoryFile instance with the created file info
@throws GitLabApiException if any exception occurs | [
"Create",
"new",
"file",
"in",
"repository"
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryFileApi.java#L206-L219 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryFileApi.java | RepositoryFileApi.getRawFile | public File getRawFile(Object projectIdOrPath, String commitOrBranchName, String filepath, File directory) throws GitLabApiException {
InputStream in = getRawFile(projectIdOrPath, commitOrBranchName, filepath);
try {
if (directory == null) {
directory = new File(System.getProperty("java.io.tmpdir"));
}
String filename = new File(filepath).getName();
File file = new File(directory, filename);
Files.copy(in, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
return (file);
} catch (IOException ioe) {
throw new GitLabApiException(ioe);
} finally {
try {
in.close();
} catch (IOException ignore) {
}
}
} | java | public File getRawFile(Object projectIdOrPath, String commitOrBranchName, String filepath, File directory) throws GitLabApiException {
InputStream in = getRawFile(projectIdOrPath, commitOrBranchName, filepath);
try {
if (directory == null) {
directory = new File(System.getProperty("java.io.tmpdir"));
}
String filename = new File(filepath).getName();
File file = new File(directory, filename);
Files.copy(in, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
return (file);
} catch (IOException ioe) {
throw new GitLabApiException(ioe);
} finally {
try {
in.close();
} catch (IOException ignore) {
}
}
} | [
"public",
"File",
"getRawFile",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"commitOrBranchName",
",",
"String",
"filepath",
",",
"File",
"directory",
")",
"throws",
"GitLabApiException",
"{",
"InputStream",
"in",
"=",
"getRawFile",
"(",
"projectIdOrPath",
",",... | Get the raw file for the file by commit sha and path. Thye file will be saved to the specified directory.
If the file already exists in the directory it will be overwritten.
V3:
<pre><code>GitLab Endpoint: GET /projects/:id/repository/blobs/:sha</code></pre>
V4:
<pre><code>GitLab Endpoint: GET /projects/:id/repository/files/:filepath</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param commitOrBranchName the commit or branch name to get the file for
@param filepath the path of the file to get
@param directory the File instance of the directory to save the file to, if null will use "java.io.tmpdir"
@return a File instance pointing to the download of the specified file
@throws GitLabApiException if any exception occurs | [
"Get",
"the",
"raw",
"file",
"for",
"the",
"file",
"by",
"commit",
"sha",
"and",
"path",
".",
"Thye",
"file",
"will",
"be",
"saved",
"to",
"the",
"specified",
"directory",
".",
"If",
"the",
"file",
"already",
"exists",
"in",
"the",
"directory",
"it",
"... | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryFileApi.java#L374-L398 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryFileApi.java | RepositoryFileApi.getRawFile | public InputStream getRawFile(Object projectIdOrPath, String commitOrBranchName, String filepath) throws GitLabApiException {
if (isApiVersion(ApiVersion.V3)) {
Form formData = new GitLabApiForm().withParam("file_path", filepath, true);
Response response = getWithAccepts(Response.Status.OK, formData.asMap(), MediaType.MEDIA_TYPE_WILDCARD,
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "blobs", commitOrBranchName);
return (response.readEntity(InputStream.class));
} else {
Form formData = new GitLabApiForm().withParam("ref", commitOrBranchName, true);
Response response = getWithAccepts(Response.Status.OK, formData.asMap(), MediaType.MEDIA_TYPE_WILDCARD,
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "files", urlEncode(filepath), "raw");
return (response.readEntity(InputStream.class));
}
} | java | public InputStream getRawFile(Object projectIdOrPath, String commitOrBranchName, String filepath) throws GitLabApiException {
if (isApiVersion(ApiVersion.V3)) {
Form formData = new GitLabApiForm().withParam("file_path", filepath, true);
Response response = getWithAccepts(Response.Status.OK, formData.asMap(), MediaType.MEDIA_TYPE_WILDCARD,
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "blobs", commitOrBranchName);
return (response.readEntity(InputStream.class));
} else {
Form formData = new GitLabApiForm().withParam("ref", commitOrBranchName, true);
Response response = getWithAccepts(Response.Status.OK, formData.asMap(), MediaType.MEDIA_TYPE_WILDCARD,
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "files", urlEncode(filepath), "raw");
return (response.readEntity(InputStream.class));
}
} | [
"public",
"InputStream",
"getRawFile",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"commitOrBranchName",
",",
"String",
"filepath",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"isApiVersion",
"(",
"ApiVersion",
".",
"V3",
")",
")",
"{",
"Form",
"fo... | Get the raw file contents for a file by commit sha and path.
V3:
<pre><code>GitLab Endpoint: GET /projects/:id/repository/blobs/:sha</code></pre>
V4:
<pre><code>GitLab Endpoint: GET /projects/:id/repository/files/:filepath</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param commitOrBranchName the commit or branch name to get the file contents for
@param filepath the path of the file to get
@return an InputStream to read the raw file from
@throws GitLabApiException if any exception occurs | [
"Get",
"the",
"raw",
"file",
"contents",
"for",
"a",
"file",
"by",
"commit",
"sha",
"and",
"path",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryFileApi.java#L415-L428 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryFileApi.java | RepositoryFileApi.createForm | protected Form createForm(RepositoryFile file, String branchName, String commitMessage) {
Form form = new Form();
if (isApiVersion(ApiVersion.V3)) {
addFormParam(form, "file_path", file.getFilePath(), true);
addFormParam(form, "branch_name", branchName, true);
} else {
addFormParam(form, "branch", branchName, true);
}
addFormParam(form, "encoding", file.getEncoding(), false);
// Cannot use addFormParam() as it does not accept an empty or whitespace only string
String content = file.getContent();
if (content == null) {
throw new IllegalArgumentException("content cannot be null");
}
form.param("content", content);
addFormParam(form, "commit_message", commitMessage, true);
return (form);
} | java | protected Form createForm(RepositoryFile file, String branchName, String commitMessage) {
Form form = new Form();
if (isApiVersion(ApiVersion.V3)) {
addFormParam(form, "file_path", file.getFilePath(), true);
addFormParam(form, "branch_name", branchName, true);
} else {
addFormParam(form, "branch", branchName, true);
}
addFormParam(form, "encoding", file.getEncoding(), false);
// Cannot use addFormParam() as it does not accept an empty or whitespace only string
String content = file.getContent();
if (content == null) {
throw new IllegalArgumentException("content cannot be null");
}
form.param("content", content);
addFormParam(form, "commit_message", commitMessage, true);
return (form);
} | [
"protected",
"Form",
"createForm",
"(",
"RepositoryFile",
"file",
",",
"String",
"branchName",
",",
"String",
"commitMessage",
")",
"{",
"Form",
"form",
"=",
"new",
"Form",
"(",
")",
";",
"if",
"(",
"isApiVersion",
"(",
"ApiVersion",
".",
"V3",
")",
")",
... | Gets the query params based on the API version.
@param file the RepositoryFile instance with the info for the query params
@param branchName the branch name
@param commitMessage the commit message
@return a Form instance with the correct query params. | [
"Gets",
"the",
"query",
"params",
"based",
"on",
"the",
"API",
"version",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryFileApi.java#L438-L459 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/SystemHooksApi.java | SystemHooksApi.getSystemHooks | public List<SystemHook> getSystemHooks(int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "hooks");
return (response.readEntity(new GenericType<List<SystemHook>>() {}));
} | java | public List<SystemHook> getSystemHooks(int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "hooks");
return (response.readEntity(new GenericType<List<SystemHook>>() {}));
} | [
"public",
"List",
"<",
"SystemHook",
">",
"getSystemHooks",
"(",
"int",
"page",
",",
"int",
"perPage",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"getPageQueryParams",
"(",
"p... | Get a list of all system hooks using the specified page and per page settings.
This method requires admin access.
<pre><code>GitLab Endpoint: GET /hooks</code></pre>
@param page the page to get
@param perPage the number of deploy keys per page
@return the list of SystemHookEvent in the specified range
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"list",
"of",
"all",
"system",
"hooks",
"using",
"the",
"specified",
"page",
"and",
"per",
"page",
"settings",
".",
"This",
"method",
"requires",
"admin",
"access",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/SystemHooksApi.java#L44-L47 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/SystemHooksApi.java | SystemHooksApi.getSystemHooks | public Pager<SystemHook> getSystemHooks(int itemsPerPage) throws GitLabApiException {
return (new Pager<SystemHook>(this, SystemHook.class, itemsPerPage, null, "hooks"));
} | java | public Pager<SystemHook> getSystemHooks(int itemsPerPage) throws GitLabApiException {
return (new Pager<SystemHook>(this, SystemHook.class, itemsPerPage, null, "hooks"));
} | [
"public",
"Pager",
"<",
"SystemHook",
">",
"getSystemHooks",
"(",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"SystemHook",
">",
"(",
"this",
",",
"SystemHook",
".",
"class",
",",
"itemsPerPage",
",",
... | Get a Pager of all system hooks. This method requires admin access.
<pre><code>GitLab Endpoint: GET /hooks</code></pre>
@param itemsPerPage the number of SystemHookEvent instances that will be fetched per page
@return a Pager of SystemHookEvent
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"Pager",
"of",
"all",
"system",
"hooks",
".",
"This",
"method",
"requires",
"admin",
"access",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/SystemHooksApi.java#L58-L60 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/SystemHooksApi.java | SystemHooksApi.addSystemHook | public SystemHook addSystemHook(String url, String token, Boolean pushEvents,
Boolean tagPushEvents, Boolean enablSsslVerification) throws GitLabApiException {
if (url == null) {
throw new RuntimeException("url cannot be null");
}
GitLabApiForm formData = new GitLabApiForm()
.withParam("url", url, true)
.withParam("token", token)
.withParam("push_events", pushEvents)
.withParam("tag_push_events", tagPushEvents)
.withParam("enable_ssl_verification", enablSsslVerification);
Response response = post(Response.Status.CREATED, formData, "hooks");
return (response.readEntity(SystemHook.class));
} | java | public SystemHook addSystemHook(String url, String token, Boolean pushEvents,
Boolean tagPushEvents, Boolean enablSsslVerification) throws GitLabApiException {
if (url == null) {
throw new RuntimeException("url cannot be null");
}
GitLabApiForm formData = new GitLabApiForm()
.withParam("url", url, true)
.withParam("token", token)
.withParam("push_events", pushEvents)
.withParam("tag_push_events", tagPushEvents)
.withParam("enable_ssl_verification", enablSsslVerification);
Response response = post(Response.Status.CREATED, formData, "hooks");
return (response.readEntity(SystemHook.class));
} | [
"public",
"SystemHook",
"addSystemHook",
"(",
"String",
"url",
",",
"String",
"token",
",",
"Boolean",
"pushEvents",
",",
"Boolean",
"tagPushEvents",
",",
"Boolean",
"enablSsslVerification",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"url",
"==",
"null",... | Add a new system hook. This method requires admin access.
<pre><code>GitLab Endpoint: POST /hooks</code></pre>
@param url the hook URL, required
@param token secret token to validate received payloads, optional
@param pushEvents when true, the hook will fire on push events, optional
@param tagPushEvents when true, the hook will fire on new tags being pushed, optional
@param enablSsslVerification do SSL verification when triggering the hook, optional
@return an SystemHookEvent instance with info on the added system hook
@throws GitLabApiException if any exception occurs | [
"Add",
"a",
"new",
"system",
"hook",
".",
"This",
"method",
"requires",
"admin",
"access",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/SystemHooksApi.java#L87-L102 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/LabelsApi.java | LabelsApi.getLabels | public List<Label> getLabels(Object projectIdOrPath) throws GitLabApiException {
return (getLabels(projectIdOrPath, getDefaultPerPage()).all());
} | java | public List<Label> getLabels(Object projectIdOrPath) throws GitLabApiException {
return (getLabels(projectIdOrPath, getDefaultPerPage()).all());
} | [
"public",
"List",
"<",
"Label",
">",
"getLabels",
"(",
"Object",
"projectIdOrPath",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getLabels",
"(",
"projectIdOrPath",
",",
"getDefaultPerPage",
"(",
")",
")",
".",
"all",
"(",
")",
")",
";",
"}"
] | Get all labels of the specified project.
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@return a list of project's labels
@throws GitLabApiException if any exception occurs | [
"Get",
"all",
"labels",
"of",
"the",
"specified",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/LabelsApi.java#L24-L26 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/LabelsApi.java | LabelsApi.getLabels | public Pager<Label> getLabels(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Label>(this, Label.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "labels"));
} | java | public Pager<Label> getLabels(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Label>(this, Label.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "labels"));
} | [
"public",
"Pager",
"<",
"Label",
">",
"getLabels",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Label",
">",
"(",
"this",
",",
"Label",
".",
"class",
",",
"item... | Get a Pager of all labels of the specified project.
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param itemsPerPage the number of items per page
@return a list of project's labels in the specified range
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"Pager",
"of",
"all",
"labels",
"of",
"the",
"specified",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/LabelsApi.java#L51-L54 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/LabelsApi.java | LabelsApi.getLabelsStream | public Stream<Label> getLabelsStream(Object projectIdOrPath) throws GitLabApiException {
return (getLabels(projectIdOrPath, getDefaultPerPage()).stream());
} | java | public Stream<Label> getLabelsStream(Object projectIdOrPath) throws GitLabApiException {
return (getLabels(projectIdOrPath, getDefaultPerPage()).stream());
} | [
"public",
"Stream",
"<",
"Label",
">",
"getLabelsStream",
"(",
"Object",
"projectIdOrPath",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getLabels",
"(",
"projectIdOrPath",
",",
"getDefaultPerPage",
"(",
")",
")",
".",
"stream",
"(",
")",
")",
";"... | Get a Stream of all labels of the specified project.
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@return a Stream of project's labels
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"Stream",
"of",
"all",
"labels",
"of",
"the",
"specified",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/LabelsApi.java#L63-L65 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/LabelsApi.java | LabelsApi.deleteLabel | public void deleteLabel(Object projectIdOrPath, String name) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("name", name, true);
Response.Status expectedStatus = (isApiVersion(GitLabApi.ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "labels");
} | java | public void deleteLabel(Object projectIdOrPath, String name) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("name", name, true);
Response.Status expectedStatus = (isApiVersion(GitLabApi.ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "labels");
} | [
"public",
"void",
"deleteLabel",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"name",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"\"name\"",
",",
"name",
",",
"true",
... | Delete the specified label
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param name the name for the label
@throws GitLabApiException if any exception occurs | [
"Delete",
"the",
"specified",
"label"
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/LabelsApi.java#L194-L199 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/LabelsApi.java | LabelsApi.subscribeLabel | public Label subscribeLabel(Object projectIdOrPath, Integer labelId) throws GitLabApiException {
Response response = post(Response.Status.NOT_MODIFIED, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "labels", labelId, "subscribe");
return (response.readEntity(Label.class));
} | java | public Label subscribeLabel(Object projectIdOrPath, Integer labelId) throws GitLabApiException {
Response response = post(Response.Status.NOT_MODIFIED, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "labels", labelId, "subscribe");
return (response.readEntity(Label.class));
} | [
"public",
"Label",
"subscribeLabel",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"labelId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"post",
"(",
"Response",
".",
"Status",
".",
"NOT_MODIFIED",
",",
"getDefaultPerPageParam",
"(",
... | Subscribe a specified label
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param labelId the label ID
@return HttpStatusCode 503
@throws GitLabApiException if any exception occurs | [
"Subscribe",
"a",
"specified",
"label"
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/LabelsApi.java#L209-L213 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/ProxyClientConfig.java | ProxyClientConfig.createProxyClientConfig | public static Map<String, Object> createProxyClientConfig(String proxyUri) {
return (createProxyClientConfig(proxyUri, null, null));
} | java | public static Map<String, Object> createProxyClientConfig(String proxyUri) {
return (createProxyClientConfig(proxyUri, null, null));
} | [
"public",
"static",
"Map",
"<",
"String",
",",
"Object",
">",
"createProxyClientConfig",
"(",
"String",
"proxyUri",
")",
"{",
"return",
"(",
"createProxyClientConfig",
"(",
"proxyUri",
",",
"null",
",",
"null",
")",
")",
";",
"}"
] | Create a Map instance with properties set up to use a proxy server that can be passed to the
GitLabAPi constructors and login methods to configure the GitLabApi instance to use a proxy server.
@param proxyUri the URI of the proxy server
@return a Map set up to allow GitLabApi to use a proxy server | [
"Create",
"a",
"Map",
"instance",
"with",
"properties",
"set",
"up",
"to",
"use",
"a",
"proxy",
"server",
"that",
"can",
"be",
"passed",
"to",
"the",
"GitLabAPi",
"constructors",
"and",
"login",
"methods",
"to",
"configure",
"the",
"GitLabApi",
"instance",
"... | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProxyClientConfig.java#L20-L22 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/ProxyClientConfig.java | ProxyClientConfig.createProxyClientConfig | public static Map<String, Object> createProxyClientConfig(String proxyUri, String username, String password) {
Map<String, Object> clientConfig = new HashMap<>();
clientConfig.put(ClientProperties.PROXY_URI, proxyUri);
if (username != null && username.trim().length() > 0) {
clientConfig.put(ClientProperties.PROXY_USERNAME, username);
}
if (password != null && password.trim().length() > 0) {
clientConfig.put(ClientProperties.PROXY_PASSWORD, password);
}
return (clientConfig);
} | java | public static Map<String, Object> createProxyClientConfig(String proxyUri, String username, String password) {
Map<String, Object> clientConfig = new HashMap<>();
clientConfig.put(ClientProperties.PROXY_URI, proxyUri);
if (username != null && username.trim().length() > 0) {
clientConfig.put(ClientProperties.PROXY_USERNAME, username);
}
if (password != null && password.trim().length() > 0) {
clientConfig.put(ClientProperties.PROXY_PASSWORD, password);
}
return (clientConfig);
} | [
"public",
"static",
"Map",
"<",
"String",
",",
"Object",
">",
"createProxyClientConfig",
"(",
"String",
"proxyUri",
",",
"String",
"username",
",",
"String",
"password",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"clientConfig",
"=",
"new",
"HashMap... | Create a Map instance set up to use a proxy server that can be passed to the GitLabAPi constructors
and login methods to configure the GitLabApi instance to use a proxy server.
@param proxyUri the URI of the proxy server
@param username the username for basic auth with the proxy server
@param password the password for basic auth with the proxy server
@return a Map set up to allow GitLabApi to use a proxy server | [
"Create",
"a",
"Map",
"instance",
"set",
"up",
"to",
"use",
"a",
"proxy",
"server",
"that",
"can",
"be",
"passed",
"to",
"the",
"GitLabAPi",
"constructors",
"and",
"login",
"methods",
"to",
"configure",
"the",
"GitLabApi",
"instance",
"to",
"use",
"a",
"pr... | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProxyClientConfig.java#L33-L47 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/utils/ISO8601.java | ISO8601.getTimestamp | public static String getTimestamp(boolean withMsec) {
return (withMsec ? SafeDateFormatter.getDateFormat(PATTERN_MSEC).format(new Date()) :
SafeDateFormatter.getDateFormat(PATTERN).format(new Date()));
} | java | public static String getTimestamp(boolean withMsec) {
return (withMsec ? SafeDateFormatter.getDateFormat(PATTERN_MSEC).format(new Date()) :
SafeDateFormatter.getDateFormat(PATTERN).format(new Date()));
} | [
"public",
"static",
"String",
"getTimestamp",
"(",
"boolean",
"withMsec",
")",
"{",
"return",
"(",
"withMsec",
"?",
"SafeDateFormatter",
".",
"getDateFormat",
"(",
"PATTERN_MSEC",
")",
".",
"format",
"(",
"new",
"Date",
"(",
")",
")",
":",
"SafeDateFormatter",... | Get a ISO8601formatted string for the current date and time.
@param withMsec flag indicating whether to include milliseconds
@return a ISO8601 formatted string for the current date and time | [
"Get",
"a",
"ISO8601formatted",
"string",
"for",
"the",
"current",
"date",
"and",
"time",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/ISO8601.java#L80-L83 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/utils/ISO8601.java | ISO8601.toInstant | public static Instant toInstant(String dateTimeString) throws ParseException {
if (dateTimeString == null) {
return (null);
}
dateTimeString = dateTimeString.trim();
if (dateTimeString.endsWith("Z")) {
return (Instant.parse(dateTimeString));
} else {
// Convert UTC zoned dates to 0 offset date
if (dateTimeString.endsWith("UTC")) {
dateTimeString = dateTimeString.replace("UTC", "+0000");
}
OffsetDateTime odt = (dateTimeString.length() > 25 ?
OffsetDateTime.parse(dateTimeString, ODT_WITH_MSEC_PARSER) :
OffsetDateTime.parse(dateTimeString, ODT_PARSER));
return (odt.toInstant());
}
} | java | public static Instant toInstant(String dateTimeString) throws ParseException {
if (dateTimeString == null) {
return (null);
}
dateTimeString = dateTimeString.trim();
if (dateTimeString.endsWith("Z")) {
return (Instant.parse(dateTimeString));
} else {
// Convert UTC zoned dates to 0 offset date
if (dateTimeString.endsWith("UTC")) {
dateTimeString = dateTimeString.replace("UTC", "+0000");
}
OffsetDateTime odt = (dateTimeString.length() > 25 ?
OffsetDateTime.parse(dateTimeString, ODT_WITH_MSEC_PARSER) :
OffsetDateTime.parse(dateTimeString, ODT_PARSER));
return (odt.toInstant());
}
} | [
"public",
"static",
"Instant",
"toInstant",
"(",
"String",
"dateTimeString",
")",
"throws",
"ParseException",
"{",
"if",
"(",
"dateTimeString",
"==",
"null",
")",
"{",
"return",
"(",
"null",
")",
";",
"}",
"dateTimeString",
"=",
"dateTimeString",
".",
"trim",
... | Parses an ISO8601 formatted string a returns an Instant instance.
@param dateTimeString the ISO8601 formatted string
@return an Instant instance for the ISO8601 formatted string
@throws ParseException if the provided string is not in the proper format | [
"Parses",
"an",
"ISO8601",
"formatted",
"string",
"a",
"returns",
"an",
"Instant",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/ISO8601.java#L136-L159 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/utils/ISO8601.java | ISO8601.toDate | public static Date toDate(String dateTimeString) throws ParseException {
Instant instant = toInstant(dateTimeString);
return (instant != null ? Date.from(instant) : null);
} | java | public static Date toDate(String dateTimeString) throws ParseException {
Instant instant = toInstant(dateTimeString);
return (instant != null ? Date.from(instant) : null);
} | [
"public",
"static",
"Date",
"toDate",
"(",
"String",
"dateTimeString",
")",
"throws",
"ParseException",
"{",
"Instant",
"instant",
"=",
"toInstant",
"(",
"dateTimeString",
")",
";",
"return",
"(",
"instant",
"!=",
"null",
"?",
"Date",
".",
"from",
"(",
"inst... | Parses an ISO8601 formatted string a returns a Date instance.
@param dateTimeString the ISO8601 formatted string
@return a Date instance for the ISO8601 formatted string
@throws ParseException if the provided string is not in the proper format | [
"Parses",
"an",
"ISO8601",
"formatted",
"string",
"a",
"returns",
"a",
"Date",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/ISO8601.java#L168-L171 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/utils/ISO8601.java | ISO8601.toCalendar | public static Calendar toCalendar(String dateTimeString) throws ParseException {
Date date = toDate(dateTimeString);
if (date == null) {
return (null);
}
Calendar cal = Calendar.getInstance();
cal.setTime(date);
return (cal);
} | java | public static Calendar toCalendar(String dateTimeString) throws ParseException {
Date date = toDate(dateTimeString);
if (date == null) {
return (null);
}
Calendar cal = Calendar.getInstance();
cal.setTime(date);
return (cal);
} | [
"public",
"static",
"Calendar",
"toCalendar",
"(",
"String",
"dateTimeString",
")",
"throws",
"ParseException",
"{",
"Date",
"date",
"=",
"toDate",
"(",
"dateTimeString",
")",
";",
"if",
"(",
"date",
"==",
"null",
")",
"{",
"return",
"(",
"null",
")",
";",... | Parses an ISO8601 formatted string a returns a Calendar instance.
@param dateTimeString the ISO8601 formatted string
@return a Calendar instance for the ISO8601 formatted string
@throws ParseException if the provided string is not in the proper format | [
"Parses",
"an",
"ISO8601",
"formatted",
"string",
"a",
"returns",
"a",
"Calendar",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/ISO8601.java#L180-L190 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/BoardsApi.java | BoardsApi.getBoards | public List<Board> getBoards(Object projectIdOrPath) throws GitLabApiException {
return (getBoards(projectIdOrPath, getDefaultPerPage()).all());
} | java | public List<Board> getBoards(Object projectIdOrPath) throws GitLabApiException {
return (getBoards(projectIdOrPath, getDefaultPerPage()).all());
} | [
"public",
"List",
"<",
"Board",
">",
"getBoards",
"(",
"Object",
"projectIdOrPath",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getBoards",
"(",
"projectIdOrPath",
",",
"getDefaultPerPage",
"(",
")",
")",
".",
"all",
"(",
")",
")",
";",
"}"
] | Lists Issue Boards in the given project.
<pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@return a list of project's issue boards
@throws GitLabApiException if any exception occurs | [
"Lists",
"Issue",
"Boards",
"in",
"the",
"given",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L36-L38 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/BoardsApi.java | BoardsApi.getBoards | public List<Board> getBoards(Object projectIdOrPath, int page, int perPage) throws GitLabApiException {
Response response = get(javax.ws.rs.core.Response.Status.OK, getPageQueryParams(page, perPage),
"projects", getProjectIdOrPath(projectIdOrPath), "boards");
return (response.readEntity(new GenericType<List<Board>>() {}));
} | java | public List<Board> getBoards(Object projectIdOrPath, int page, int perPage) throws GitLabApiException {
Response response = get(javax.ws.rs.core.Response.Status.OK, getPageQueryParams(page, perPage),
"projects", getProjectIdOrPath(projectIdOrPath), "boards");
return (response.readEntity(new GenericType<List<Board>>() {}));
} | [
"public",
"List",
"<",
"Board",
">",
"getBoards",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"page",
",",
"int",
"perPage",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"javax",
".",
"ws",
".",
"rs",
".",
"core",
... | Get all issue boards for the specified project using the specified page and per page setting
<pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param page the page to get
@param perPage the number of items per page
@return a list of project's Boards in the specified range
@throws GitLabApiException if any exception occurs | [
"Get",
"all",
"issue",
"boards",
"for",
"the",
"specified",
"project",
"using",
"the",
"specified",
"page",
"and",
"per",
"page",
"setting"
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L51-L55 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/BoardsApi.java | BoardsApi.getBoards | public Pager<Board> getBoards(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Board>(this, Board.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "boards"));
} | java | public Pager<Board> getBoards(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Board>(this, Board.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "boards"));
} | [
"public",
"Pager",
"<",
"Board",
">",
"getBoards",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Board",
">",
"(",
"this",
",",
"Board",
".",
"class",
",",
"item... | Get a Pager of all issue boards for the specified project.
<pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param itemsPerPage the number of items per page
@return a Pager of project's issue boards
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"Pager",
"of",
"all",
"issue",
"boards",
"for",
"the",
"specified",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L67-L70 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/BoardsApi.java | BoardsApi.getBoardsStream | public Stream<Board> getBoardsStream(Object projectIdOrPath) throws GitLabApiException {
return (getBoards(projectIdOrPath, getDefaultPerPage()).stream());
} | java | public Stream<Board> getBoardsStream(Object projectIdOrPath) throws GitLabApiException {
return (getBoards(projectIdOrPath, getDefaultPerPage()).stream());
} | [
"public",
"Stream",
"<",
"Board",
">",
"getBoardsStream",
"(",
"Object",
"projectIdOrPath",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getBoards",
"(",
"projectIdOrPath",
",",
"getDefaultPerPage",
"(",
")",
")",
".",
"stream",
"(",
")",
")",
";"... | Get a Stream of all issue boards for the specified project.
<pre><code>GitLab Endpoint: GET /projects/:id/boards</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@return a Stream of project's issue boards
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"Stream",
"of",
"all",
"issue",
"boards",
"for",
"the",
"specified",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L81-L83 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/BoardsApi.java | BoardsApi.getBoard | public Board getBoard(Object projectIdOrPath, Integer boardId) throws GitLabApiException {
Response response = get(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId);
return (response.readEntity(Board.class));
} | java | public Board getBoard(Object projectIdOrPath, Integer boardId) throws GitLabApiException {
Response response = get(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId);
return (response.readEntity(Board.class));
} | [
"public",
"Board",
"getBoard",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"boardId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
",",
"\"projects\"",
",",
"getProj... | Get a single issue board.
<pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param boardId the ID of the board
@return a Board instance for the specified board ID
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"single",
"issue",
"board",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L95-L99 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/BoardsApi.java | BoardsApi.getOptionalBoard | public Optional<Board> getOptionalBoard(Object projectIdOrPath, Integer boardId) {
try {
return (Optional.ofNullable(getBoard(projectIdOrPath, boardId)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | java | public Optional<Board> getOptionalBoard(Object projectIdOrPath, Integer boardId) {
try {
return (Optional.ofNullable(getBoard(projectIdOrPath, boardId)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | [
"public",
"Optional",
"<",
"Board",
">",
"getOptionalBoard",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"boardId",
")",
"{",
"try",
"{",
"return",
"(",
"Optional",
".",
"ofNullable",
"(",
"getBoard",
"(",
"projectIdOrPath",
",",
"boardId",
")",
")",
"... | Get an issue board as an Optional instance.
<pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param boardId the ID of the board
@return the Board instance for the specified board ID as an Optional instance | [
"Get",
"an",
"issue",
"board",
"as",
"an",
"Optional",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L110-L116 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/BoardsApi.java | BoardsApi.createBoard | public Board createBoard(Object projectIdOrPath, String name) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("name", name, true);
Response response = post(Response.Status.CREATED, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "boards");
return (response.readEntity(Board.class));
} | java | public Board createBoard(Object projectIdOrPath, String name) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("name", name, true);
Response response = post(Response.Status.CREATED, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "boards");
return (response.readEntity(Board.class));
} | [
"public",
"Board",
"createBoard",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"name",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"\"name\"",
",",
"name",
",",
"true",
... | Creates a new Issue Board.
<p>NOTE: This is only available in GitLab EE</p>
<pre><code>GitLab Endpoint: POST /projects/:id/boards</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param name the name for the new board
@return the created Board instance
@throws GitLabApiException if any exception occurs | [
"Creates",
"a",
"new",
"Issue",
"Board",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L130-L134 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/BoardsApi.java | BoardsApi.updateBoard | public BoardList updateBoard(Object projectIdOrPath, Integer boardId, String name,
Integer assigneeId, Integer milestoneId, String labels, Integer weight) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("name", name)
.withParam("assignee_id", assigneeId)
.withParam("milestone_id", milestoneId)
.withParam("labels", labels)
.withParam("weight", weight);
Response response = put(Response.Status.OK, formData.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId);
return (response.readEntity(BoardList.class));
} | java | public BoardList updateBoard(Object projectIdOrPath, Integer boardId, String name,
Integer assigneeId, Integer milestoneId, String labels, Integer weight) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("name", name)
.withParam("assignee_id", assigneeId)
.withParam("milestone_id", milestoneId)
.withParam("labels", labels)
.withParam("weight", weight);
Response response = put(Response.Status.OK, formData.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId);
return (response.readEntity(BoardList.class));
} | [
"public",
"BoardList",
"updateBoard",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"boardId",
",",
"String",
"name",
",",
"Integer",
"assigneeId",
",",
"Integer",
"milestoneId",
",",
"String",
"labels",
",",
"Integer",
"weight",
")",
"throws",
"GitLabApiExcep... | Updates an existing Issue Board.
<p>NOTE: This is only available in GitLab EE</p>
<pre><code>GitLab Endpoint: PUT /projects/:id/boards/:board_id</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
@param boardId the ID of the board, required
@param name the new name of the board, optional (can be null)
@param assigneeId the assignee the board should be scoped to, optional (can be null)
@param milestoneId the milestone the board should be scoped to, optional (can be null)
@param labels a comma-separated list of label names which the board should be scoped to, optional (can be null)
@param weight the weight range from 0 to 9, to which the board should be scoped to, optional (can be null)
@return the updated Board instance
@throws GitLabApiException if any exception occurs | [
"Updates",
"an",
"existing",
"Issue",
"Board",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L153-L164 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/BoardsApi.java | BoardsApi.deleteBoard | public void deleteBoard(Object projectIdOrPath, Integer boardId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId);
} | java | public void deleteBoard(Object projectIdOrPath, Integer boardId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId);
} | [
"public",
"void",
"deleteBoard",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"boardId",
")",
"throws",
"GitLabApiException",
"{",
"delete",
"(",
"Response",
".",
"Status",
".",
"NO_CONTENT",
",",
"null",
",",
"\"projects\"",
",",
"getProjectIdOrPath",
"(",
... | Soft deletes an existing Issue Board.
<p>NOTE: This is only available in GitLab EE</p>
<pre><code>GitLab Endpoint: DELETE /projects/:id/boards/:board_id</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param boardId the ID of the board
@throws GitLabApiException if any exception occurs | [
"Soft",
"deletes",
"an",
"existing",
"Issue",
"Board",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L177-L179 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/BoardsApi.java | BoardsApi.getBoardList | public BoardList getBoardList(Object projectIdOrPath, Integer boardId, Integer listId) throws GitLabApiException {
Response response = get(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId);
return (response.readEntity(BoardList.class));
} | java | public BoardList getBoardList(Object projectIdOrPath, Integer boardId, Integer listId) throws GitLabApiException {
Response response = get(Response.Status.OK, null,
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId);
return (response.readEntity(BoardList.class));
} | [
"public",
"BoardList",
"getBoardList",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"boardId",
",",
"Integer",
"listId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
... | Get a single issue board list.
<pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param boardId the ID of the board
@param listId the ID of the board lists to get
@return a BoardList instance for the specified board ID and list ID
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"single",
"issue",
"board",
"list",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L255-L259 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/BoardsApi.java | BoardsApi.getOptionalBoardList | public Optional<BoardList> getOptionalBoardList(Object projectIdOrPath, Integer boardId, Integer listId) {
try {
return (Optional.ofNullable(getBoardList(projectIdOrPath, boardId, listId)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | java | public Optional<BoardList> getOptionalBoardList(Object projectIdOrPath, Integer boardId, Integer listId) {
try {
return (Optional.ofNullable(getBoardList(projectIdOrPath, boardId, listId)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | [
"public",
"Optional",
"<",
"BoardList",
">",
"getOptionalBoardList",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"boardId",
",",
"Integer",
"listId",
")",
"{",
"try",
"{",
"return",
"(",
"Optional",
".",
"ofNullable",
"(",
"getBoardList",
"(",
"projectIdOr... | Get a single issue board list as an Optional instance.
<pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param boardId the ID of the board
@param listId the ID of the board lists to get
@return a BoardList instance for the specified board ID and list ID as an Optional instance | [
"Get",
"a",
"single",
"issue",
"board",
"list",
"as",
"an",
"Optional",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L271-L277 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/BoardsApi.java | BoardsApi.createBoardList | public BoardList createBoardList(Object projectIdOrPath, Integer boardId, Integer labelId) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("label_id", labelId, true);
Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists");
return (response.readEntity(BoardList.class));
} | java | public BoardList createBoardList(Object projectIdOrPath, Integer boardId, Integer labelId) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("label_id", labelId, true);
Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists");
return (response.readEntity(BoardList.class));
} | [
"public",
"BoardList",
"createBoardList",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"boardId",
",",
"Integer",
"labelId",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"... | Creates a new Issue Board list.
<pre><code>GitLab Endpoint: POST /projects/:id/boards/:board_id/lists</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param boardId the ID of the board
@param labelId the ID of the label
@return the created BoardList instance
@throws GitLabApiException if any exception occurs | [
"Creates",
"a",
"new",
"Issue",
"Board",
"list",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L290-L295 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/BoardsApi.java | BoardsApi.updateBoardList | public BoardList updateBoardList(Object projectIdOrPath, Integer boardId, Integer listId, Integer position) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("position", position, true);
Response response = putWithFormData(Response.Status.OK, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId);
return (response.readEntity(BoardList.class));
} | java | public BoardList updateBoardList(Object projectIdOrPath, Integer boardId, Integer listId, Integer position) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("position", position, true);
Response response = putWithFormData(Response.Status.OK, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId);
return (response.readEntity(BoardList.class));
} | [
"public",
"BoardList",
"updateBoardList",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"boardId",
",",
"Integer",
"listId",
",",
"Integer",
"position",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",... | Updates an existing Issue Board list. This call is used to change list position.
<pre><code>GitLab Endpoint: PUT /projects/:id/boards/:board_id/lists/:list_id</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param boardId the ID of the board
@param listId the ID of the list
@param position the new position for the list
@return the updated BoardList instance
@throws GitLabApiException if any exception occurs | [
"Updates",
"an",
"existing",
"Issue",
"Board",
"list",
".",
"This",
"call",
"is",
"used",
"to",
"change",
"list",
"position",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L309-L314 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/BoardsApi.java | BoardsApi.deleteBoardList | public void deleteBoardList(Object projectIdOrPath, Integer boardId, Integer listId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId);
} | java | public void deleteBoardList(Object projectIdOrPath, Integer boardId, Integer listId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId);
} | [
"public",
"void",
"deleteBoardList",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"boardId",
",",
"Integer",
"listId",
")",
"throws",
"GitLabApiException",
"{",
"delete",
"(",
"Response",
".",
"Status",
".",
"NO_CONTENT",
",",
"null",
",",
"\"projects\"",
"... | Soft deletes an existing Issue Board list. Only for admins and project owners.
<pre><code>GitLab Endpoint: DELETE /projects/:id/boards/:board_id/lists/:list_id</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param boardId the ID of the board
@param listId the ID of the list
@throws GitLabApiException if any exception occurs | [
"Soft",
"deletes",
"an",
"existing",
"Issue",
"Board",
"list",
".",
"Only",
"for",
"admins",
"and",
"project",
"owners",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L326-L328 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/services/JiraService.java | JiraService.fixJiraIssueTransitionId | private void fixJiraIssueTransitionId(Map<String, Object> properties) {
if (properties != null) {
Object jiraIssueTransitionId = properties.get(JIRA_ISSUE_TRANSITION_ID_PROP);
if (jiraIssueTransitionId instanceof String) {
if (((String)jiraIssueTransitionId).trim().isEmpty()) {
properties.put(JIRA_ISSUE_TRANSITION_ID_PROP, null);
} else {
properties.put(JIRA_ISSUE_TRANSITION_ID_PROP, Integer.valueOf((String)jiraIssueTransitionId));
}
}
}
} | java | private void fixJiraIssueTransitionId(Map<String, Object> properties) {
if (properties != null) {
Object jiraIssueTransitionId = properties.get(JIRA_ISSUE_TRANSITION_ID_PROP);
if (jiraIssueTransitionId instanceof String) {
if (((String)jiraIssueTransitionId).trim().isEmpty()) {
properties.put(JIRA_ISSUE_TRANSITION_ID_PROP, null);
} else {
properties.put(JIRA_ISSUE_TRANSITION_ID_PROP, Integer.valueOf((String)jiraIssueTransitionId));
}
}
}
} | [
"private",
"void",
"fixJiraIssueTransitionId",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
")",
"{",
"if",
"(",
"properties",
"!=",
"null",
")",
"{",
"Object",
"jiraIssueTransitionId",
"=",
"properties",
".",
"get",
"(",
"JIRA_ISSUE_TRANSITION_I... | Make sure jiraIssueTransitionId is an integer and not an empty string.
@param properties the Map holding the properties | [
"Make",
"sure",
"jiraIssueTransitionId",
"is",
"an",
"integer",
"and",
"not",
"an",
"empty",
"string",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/services/JiraService.java#L119-L131 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PipelineApi.java | PipelineApi.getPipeline | public Pipeline getPipeline(Object projectIdOrPath, int pipelineId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId);
return (response.readEntity(Pipeline.class));
} | java | public Pipeline getPipeline(Object projectIdOrPath, int pipelineId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId);
return (response.readEntity(Pipeline.class));
} | [
"public",
"Pipeline",
"getPipeline",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"pipelineId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
",",
"\"projects\"",
",",
"ge... | Get single pipelines in a project.
<pre><code>GitLab Endpoint: GET /projects/:id/pipelines/:pipeline_id</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param pipelineId the pipeline ID to get
@return a single pipelines for the specified project ID
@throws GitLabApiException if any exception occurs during execution | [
"Get",
"single",
"pipelines",
"in",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L213-L216 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PipelineApi.java | PipelineApi.deletePipeline | public void deletePipeline(Object projectIdOrPath, int pipelineId) throws GitLabApiException {
delete(Response.Status.ACCEPTED, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId);
} | java | public void deletePipeline(Object projectIdOrPath, int pipelineId) throws GitLabApiException {
delete(Response.Status.ACCEPTED, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId);
} | [
"public",
"void",
"deletePipeline",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"pipelineId",
")",
"throws",
"GitLabApiException",
"{",
"delete",
"(",
"Response",
".",
"Status",
".",
"ACCEPTED",
",",
"null",
",",
"\"projects\"",
",",
"getProjectIdOrPath",
"(",
... | Delete a pipeline from a project.
<pre><code>GitLab Endpoint: DELETE /projects/:id/pipelines/:pipeline_id</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param pipelineId the pipeline ID to delete
@throws GitLabApiException if any exception occurs during execution | [
"Delete",
"a",
"pipeline",
"from",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L261-L263 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PipelineApi.java | PipelineApi.retryPipelineJob | public Pipeline retryPipelineJob(Object projectIdOrPath, int pipelineId) throws GitLabApiException {
GitLabApiForm formData = null;
Response response = post(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId, "retry");
return (response.readEntity(Pipeline.class));
} | java | public Pipeline retryPipelineJob(Object projectIdOrPath, int pipelineId) throws GitLabApiException {
GitLabApiForm formData = null;
Response response = post(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId, "retry");
return (response.readEntity(Pipeline.class));
} | [
"public",
"Pipeline",
"retryPipelineJob",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"pipelineId",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"null",
";",
"Response",
"response",
"=",
"post",
"(",
"Response",
".",
"Status",
".",... | Retry a job in specified pipelines in a project.
<pre><code>GitLab Endpoint: POST /projects/:id/pipelines/:pipeline_id/retry</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param pipelineId the pipeline ID to retry a job from
@return pipeline instance which just retried
@throws GitLabApiException if any exception occurs during execution | [
"Retry",
"a",
"job",
"in",
"specified",
"pipelines",
"in",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L275-L279 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PipelineApi.java | PipelineApi.getPipelineSchedules | public List<PipelineSchedule> getPipelineSchedules(Object projectIdOrPath) throws GitLabApiException {
return (getPipelineSchedules(projectIdOrPath, getDefaultPerPage()).all());
} | java | public List<PipelineSchedule> getPipelineSchedules(Object projectIdOrPath) throws GitLabApiException {
return (getPipelineSchedules(projectIdOrPath, getDefaultPerPage()).all());
} | [
"public",
"List",
"<",
"PipelineSchedule",
">",
"getPipelineSchedules",
"(",
"Object",
"projectIdOrPath",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getPipelineSchedules",
"(",
"projectIdOrPath",
",",
"getDefaultPerPage",
"(",
")",
")",
".",
"all",
"(... | Get a list of the project pipeline_schedules for the specified project.
<pre><code>GET /projects/:id/pipeline_schedules</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
@return a list of pipeline schedules for the specified project
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"list",
"of",
"the",
"project",
"pipeline_schedules",
"for",
"the",
"specified",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L306-L308 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PipelineApi.java | PipelineApi.getPipelineSchedules | public List<PipelineSchedule> getPipelineSchedules(Object projectIdOrPath, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules");
return (response.readEntity(new GenericType<List<PipelineSchedule>>() {}));
} | java | public List<PipelineSchedule> getPipelineSchedules(Object projectIdOrPath, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules");
return (response.readEntity(new GenericType<List<PipelineSchedule>>() {}));
} | [
"public",
"List",
"<",
"PipelineSchedule",
">",
"getPipelineSchedules",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"page",
",",
"int",
"perPage",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
"."... | Get list of project pipeline schedules in the specified page range.
<pre><code>GET /projects/:id/pipeline_schedules</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
@param page the page to get
@param perPage the number of ProjectHook instances per page
@return a list of project pipeline_schedules for the specified project in the specified page range
@throws GitLabApiException if any exception occurs | [
"Get",
"list",
"of",
"project",
"pipeline",
"schedules",
"in",
"the",
"specified",
"page",
"range",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L321-L324 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PipelineApi.java | PipelineApi.getPipelineSchedules | public Pager<PipelineSchedule> getPipelineSchedules(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<PipelineSchedule>(this, PipelineSchedule.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules"));
} | java | public Pager<PipelineSchedule> getPipelineSchedules(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<PipelineSchedule>(this, PipelineSchedule.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules"));
} | [
"public",
"Pager",
"<",
"PipelineSchedule",
">",
"getPipelineSchedules",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"PipelineSchedule",
">",
"(",
"this",
",",
"Pipelin... | Get Pager of project pipeline schedule.
<pre><code>GET /projects/:id/pipeline_schedule</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
@param itemsPerPage the number of Project instances that will be fetched per page
@return a Pager of project pipeline_schedules for the specified project
@throws GitLabApiException if any exception occurs | [
"Get",
"Pager",
"of",
"project",
"pipeline",
"schedule",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L336-L338 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PipelineApi.java | PipelineApi.getPipelineSchedulesStream | public Stream<PipelineSchedule> getPipelineSchedulesStream(Object projectIdOrPath) throws GitLabApiException {
return (getPipelineSchedules(projectIdOrPath, getDefaultPerPage()).stream());
} | java | public Stream<PipelineSchedule> getPipelineSchedulesStream(Object projectIdOrPath) throws GitLabApiException {
return (getPipelineSchedules(projectIdOrPath, getDefaultPerPage()).stream());
} | [
"public",
"Stream",
"<",
"PipelineSchedule",
">",
"getPipelineSchedulesStream",
"(",
"Object",
"projectIdOrPath",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getPipelineSchedules",
"(",
"projectIdOrPath",
",",
"getDefaultPerPage",
"(",
")",
")",
".",
"st... | Get a Stream of the project pipeline schedule for the specified project.
<pre><code>GET /projects/:id/pipeline_schedule</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
@return a Stream of project pipeline schedules for the specified project
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"Stream",
"of",
"the",
"project",
"pipeline",
"schedule",
"for",
"the",
"specified",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L349-L351 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PipelineApi.java | PipelineApi.getPipelineSchedule | public PipelineSchedule getPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId);
return (response.readEntity(PipelineSchedule.class));
} | java | public PipelineSchedule getPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId);
return (response.readEntity(PipelineSchedule.class));
} | [
"public",
"PipelineSchedule",
"getPipelineSchedule",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"pipelineScheduleId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
",",
... | Get a specific pipeline schedule for project.
<pre><code>GET /projects/:id/pipeline_schedules/:pipeline_schedule_id</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
@param pipelineScheduleId the ID of the hook to get
@return the project hook for the specified project ID/hook ID pair
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"specific",
"pipeline",
"schedule",
"for",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L363-L366 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PipelineApi.java | PipelineApi.getOptionalPipelineSchedule | public Optional<PipelineSchedule> getOptionalPipelineSchedule (Object projectIdOrPath, Integer pipelineScheduleId) {
try {
return (Optional.ofNullable(getPipelineSchedule(projectIdOrPath, pipelineScheduleId)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | java | public Optional<PipelineSchedule> getOptionalPipelineSchedule (Object projectIdOrPath, Integer pipelineScheduleId) {
try {
return (Optional.ofNullable(getPipelineSchedule(projectIdOrPath, pipelineScheduleId)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | [
"public",
"Optional",
"<",
"PipelineSchedule",
">",
"getOptionalPipelineSchedule",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"pipelineScheduleId",
")",
"{",
"try",
"{",
"return",
"(",
"Optional",
".",
"ofNullable",
"(",
"getPipelineSchedule",
"(",
"projectIdOr... | Get a specific pipeline schedule for project as an Optional instance.
<pre><code>GET /projects/:id/pipeline_schedules/:pipeline_schedule_id</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
@param pipelineScheduleId the ID of the hook to get
@return the project hook for the specified project ID/hook ID pair as an Optional instance | [
"Get",
"a",
"specific",
"pipeline",
"schedule",
"for",
"project",
"as",
"an",
"Optional",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L377-L383 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PipelineApi.java | PipelineApi.createPipelineSchedule | public PipelineSchedule createPipelineSchedule(Object projectIdOrPath, PipelineSchedule pipelineSchedule)
throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("description", pipelineSchedule.getDescription(), true)
.withParam("ref", pipelineSchedule.getRef(), true)
.withParam("cron", pipelineSchedule.getCron(), true)
.withParam("cron_timezone", pipelineSchedule.getCronTimezone(), false)
.withParam("active", pipelineSchedule.getActive(), false);
Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules");
return (response.readEntity(PipelineSchedule.class));
} | java | public PipelineSchedule createPipelineSchedule(Object projectIdOrPath, PipelineSchedule pipelineSchedule)
throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("description", pipelineSchedule.getDescription(), true)
.withParam("ref", pipelineSchedule.getRef(), true)
.withParam("cron", pipelineSchedule.getCron(), true)
.withParam("cron_timezone", pipelineSchedule.getCronTimezone(), false)
.withParam("active", pipelineSchedule.getActive(), false);
Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules");
return (response.readEntity(PipelineSchedule.class));
} | [
"public",
"PipelineSchedule",
"createPipelineSchedule",
"(",
"Object",
"projectIdOrPath",
",",
"PipelineSchedule",
"pipelineSchedule",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"\... | create a pipeline schedule for a project.
<pre><code>POST /projects/:id/pipeline_schedules</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
@param pipelineSchedule a PipelineSchedule instance to create
@return the added PipelineSchedule instance
@throws GitLabApiException if any exception occurs | [
"create",
"a",
"pipeline",
"schedule",
"for",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L395-L406 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PipelineApi.java | PipelineApi.updatePipelineSchedule | public PipelineSchedule updatePipelineSchedule(Object projectIdOrPath,PipelineSchedule pipelineSchedule) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("description", pipelineSchedule.getDescription(), false)
.withParam("ref", pipelineSchedule.getRef(), false)
.withParam("cron", pipelineSchedule.getCron(), false)
.withParam("cron_timezone", pipelineSchedule.getCronTimezone(), false)
.withParam("active", pipelineSchedule.getActive(), false);
Response response = put(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineSchedule.getId());
return (response.readEntity(PipelineSchedule.class));
} | java | public PipelineSchedule updatePipelineSchedule(Object projectIdOrPath,PipelineSchedule pipelineSchedule) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("description", pipelineSchedule.getDescription(), false)
.withParam("ref", pipelineSchedule.getRef(), false)
.withParam("cron", pipelineSchedule.getCron(), false)
.withParam("cron_timezone", pipelineSchedule.getCronTimezone(), false)
.withParam("active", pipelineSchedule.getActive(), false);
Response response = put(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineSchedule.getId());
return (response.readEntity(PipelineSchedule.class));
} | [
"public",
"PipelineSchedule",
"updatePipelineSchedule",
"(",
"Object",
"projectIdOrPath",
",",
"PipelineSchedule",
"pipelineSchedule",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"\... | Modifies a pipeline schedule for project.
<pre><code>PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
@param pipelineSchedule the pipelineSchedule instance that contains the pipelineSchedule info to modify
@return the modified project schedule
@throws GitLabApiException if any exception occurs | [
"Modifies",
"a",
"pipeline",
"schedule",
"for",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L432-L443 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PipelineApi.java | PipelineApi.takeOwnershipPipelineSchedule | public PipelineSchedule takeOwnershipPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiException {
Response response = post(Response.Status.OK, "", "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId, "take_ownership");
return (response.readEntity(PipelineSchedule.class));
} | java | public PipelineSchedule takeOwnershipPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiException {
Response response = post(Response.Status.OK, "", "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId, "take_ownership");
return (response.readEntity(PipelineSchedule.class));
} | [
"public",
"PipelineSchedule",
"takeOwnershipPipelineSchedule",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"pipelineScheduleId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"post",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"\"\""... | Update the owner of the pipeline schedule of a project.
<pre><code>POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/take_ownership</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
@param pipelineScheduleId the pipelineSchedule instance id that ownership has to be taken of
@return the modified project schedule
@throws GitLabApiException if any exception occurs | [
"Update",
"the",
"owner",
"of",
"the",
"pipeline",
"schedule",
"of",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L455-L459 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PipelineApi.java | PipelineApi.createPipelineScheduleVariable | public Variable createPipelineScheduleVariable(Object projectIdOrPath, Integer pipelineScheduleId,
String key, String value) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("key", key, true)
.withParam("value", value, true);
Response response = post(Response.Status.CREATED, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId, "variables");
return (response.readEntity(Variable.class));
} | java | public Variable createPipelineScheduleVariable(Object projectIdOrPath, Integer pipelineScheduleId,
String key, String value) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("key", key, true)
.withParam("value", value, true);
Response response = post(Response.Status.CREATED, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId, "variables");
return (response.readEntity(Variable.class));
} | [
"public",
"Variable",
"createPipelineScheduleVariable",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"pipelineScheduleId",
",",
"String",
"key",
",",
"String",
"value",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiFor... | Create a pipeline schedule variable.
<pre><code>GitLab Endpoint: POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
@param pipelineScheduleId the pipelineSchedule ID
@param key the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed
@param value the value for the variable
@return a Pipeline instance with the newly created pipeline schedule variable
@throws GitLabApiException if any exception occurs during execution | [
"Create",
"a",
"pipeline",
"schedule",
"variable",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L473-L482 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/PipelineApi.java | PipelineApi.deletePipelineScheduleVariable | public void deletePipelineScheduleVariable(Object projectIdOrPath, Integer pipelineScheduleId, String key) throws GitLabApiException {
Response.Status expectedStatus = (isApiVersion(GitLabApi.ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath),
"pipeline_schedules", pipelineScheduleId, "variables", key);
} | java | public void deletePipelineScheduleVariable(Object projectIdOrPath, Integer pipelineScheduleId, String key) throws GitLabApiException {
Response.Status expectedStatus = (isApiVersion(GitLabApi.ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath),
"pipeline_schedules", pipelineScheduleId, "variables", key);
} | [
"public",
"void",
"deletePipelineScheduleVariable",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"pipelineScheduleId",
",",
"String",
"key",
")",
"throws",
"GitLabApiException",
"{",
"Response",
".",
"Status",
"expectedStatus",
"=",
"(",
"isApiVersion",
"(",
"Git... | Deletes a pipeline schedule variable.
<pre><code>DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables/:key</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
@param pipelineScheduleId the pipeline schedule ID
@param key the key of an existing pipeline schedule variable
@throws GitLabApiException if any exception occurs | [
"Deletes",
"a",
"pipeline",
"schedule",
"variable",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L515-L519 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/utils/DurationUtils.java | DurationUtils.parse | public static final int parse(String durationString) {
durationString = durationString.toLowerCase();
Matcher matcher = durationPattern.matcher(durationString);
int currentUnitIndex = -1;
int seconds = 0;
Boolean validDuration = null;
while (matcher.find() && validDuration != Boolean.FALSE) {
validDuration = true;
int numGroups = matcher.groupCount();
if (numGroups == 3) {
String unit = matcher.group(3);
int nextUnitIndex = getUnitIndex(unit);
if (nextUnitIndex > currentUnitIndex) {
currentUnitIndex = nextUnitIndex;
try {
seconds += Long.parseLong(matcher.group(2)) * TIME_UNIT_MULTIPLIERS[nextUnitIndex];
} catch (NumberFormatException nfe) {
validDuration = false;
}
} else {
validDuration = false;
}
} else {
validDuration = false;
}
}
if (validDuration != Boolean.TRUE) {
throw new IllegalArgumentException(String.format("'%s' is not a valid duration", durationString));
}
return (seconds);
} | java | public static final int parse(String durationString) {
durationString = durationString.toLowerCase();
Matcher matcher = durationPattern.matcher(durationString);
int currentUnitIndex = -1;
int seconds = 0;
Boolean validDuration = null;
while (matcher.find() && validDuration != Boolean.FALSE) {
validDuration = true;
int numGroups = matcher.groupCount();
if (numGroups == 3) {
String unit = matcher.group(3);
int nextUnitIndex = getUnitIndex(unit);
if (nextUnitIndex > currentUnitIndex) {
currentUnitIndex = nextUnitIndex;
try {
seconds += Long.parseLong(matcher.group(2)) * TIME_UNIT_MULTIPLIERS[nextUnitIndex];
} catch (NumberFormatException nfe) {
validDuration = false;
}
} else {
validDuration = false;
}
} else {
validDuration = false;
}
}
if (validDuration != Boolean.TRUE) {
throw new IllegalArgumentException(String.format("'%s' is not a valid duration", durationString));
}
return (seconds);
} | [
"public",
"static",
"final",
"int",
"parse",
"(",
"String",
"durationString",
")",
"{",
"durationString",
"=",
"durationString",
".",
"toLowerCase",
"(",
")",
";",
"Matcher",
"matcher",
"=",
"durationPattern",
".",
"matcher",
"(",
"durationString",
")",
";",
"... | Parses a human readable duration string and calculates the number of seconds it represents.
@param durationString the human readable duration
@return the total number of seconds in the duration | [
"Parses",
"a",
"human",
"readable",
"duration",
"string",
"and",
"calculates",
"the",
"number",
"of",
"seconds",
"it",
"represents",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/DurationUtils.java#L122-L162 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MilestonesApi.java | MilestonesApi.getGroupMilestones | public Pager<Milestone> getGroupMilestones(Object groupIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Milestone>(this, Milestone.class, itemsPerPage, null,
"groups", getGroupIdOrPath(groupIdOrPath), "milestones"));
} | java | public Pager<Milestone> getGroupMilestones(Object groupIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Milestone>(this, Milestone.class, itemsPerPage, null,
"groups", getGroupIdOrPath(groupIdOrPath), "milestones"));
} | [
"public",
"Pager",
"<",
"Milestone",
">",
"getGroupMilestones",
"(",
"Object",
"groupIdOrPath",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Milestone",
">",
"(",
"this",
",",
"Milestone",
".",
"cla... | Get a Page of group milestones.
@param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
@param itemsPerPage The number of Milestone instances that will be fetched per page
@return the milestones associated with the specified group
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"Page",
"of",
"group",
"milestones",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L58-L61 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MilestonesApi.java | MilestonesApi.getGroupMilestonesStream | public Stream<Milestone> getGroupMilestonesStream(Object groupIdOrPath) throws GitLabApiException {
return (getGroupMilestones(groupIdOrPath, getDefaultPerPage()).stream());
} | java | public Stream<Milestone> getGroupMilestonesStream(Object groupIdOrPath) throws GitLabApiException {
return (getGroupMilestones(groupIdOrPath, getDefaultPerPage()).stream());
} | [
"public",
"Stream",
"<",
"Milestone",
">",
"getGroupMilestonesStream",
"(",
"Object",
"groupIdOrPath",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getGroupMilestones",
"(",
"groupIdOrPath",
",",
"getDefaultPerPage",
"(",
")",
")",
".",
"stream",
"(",
... | Get a Stream of group milestones.
@param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
@return a Stream of the milestones associated with the specified group
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"Stream",
"of",
"group",
"milestones",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L70-L72 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MilestonesApi.java | MilestonesApi.getGroupMilestones | public List<Milestone> getGroupMilestones(Object groupIdOrPath, MilestoneState state) throws GitLabApiException {
Form formData = new GitLabApiForm().withParam("state", state).withParam(PER_PAGE_PARAM, getDefaultPerPage());
Response response = get(Response.Status.OK, formData.asMap(),
"groups", getGroupIdOrPath(groupIdOrPath), "milestones");
return (response.readEntity(new GenericType<List<Milestone>>() {}));
} | java | public List<Milestone> getGroupMilestones(Object groupIdOrPath, MilestoneState state) throws GitLabApiException {
Form formData = new GitLabApiForm().withParam("state", state).withParam(PER_PAGE_PARAM, getDefaultPerPage());
Response response = get(Response.Status.OK, formData.asMap(),
"groups", getGroupIdOrPath(groupIdOrPath), "milestones");
return (response.readEntity(new GenericType<List<Milestone>>() {}));
} | [
"public",
"List",
"<",
"Milestone",
">",
"getGroupMilestones",
"(",
"Object",
"groupIdOrPath",
",",
"MilestoneState",
"state",
")",
"throws",
"GitLabApiException",
"{",
"Form",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"\"state\"",
... | Get a list of group milestones that have the specified state.
@param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
@param state the milestone state
@return the milestones associated with the specified group and state
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"list",
"of",
"group",
"milestones",
"that",
"have",
"the",
"specified",
"state",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L82-L87 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MilestonesApi.java | MilestonesApi.getGroupMilestone | public Milestone getGroupMilestone(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"groups", getGroupIdOrPath(groupIdOrPath), "milestones", milestoneId);
return (response.readEntity(Milestone.class));
} | java | public Milestone getGroupMilestone(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"groups", getGroupIdOrPath(groupIdOrPath), "milestones", milestoneId);
return (response.readEntity(Milestone.class));
} | [
"public",
"Milestone",
"getGroupMilestone",
"(",
"Object",
"groupIdOrPath",
",",
"Integer",
"milestoneId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"getDefaultPerPageParam",
"(",
... | Get the specified group milestone.
@param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
@param milestoneId the ID of the milestone tp get
@return a Milestone instance for the specified IDs
@throws GitLabApiException if any exception occurs | [
"Get",
"the",
"specified",
"group",
"milestone",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L131-L135 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MilestonesApi.java | MilestonesApi.getGroupIssues | public List<Issue> getGroupIssues(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"groups", getGroupIdOrPath(groupIdOrPath), "milestones", milestoneId, "issues");
return (response.readEntity(new GenericType<List<Issue>>() {}));
} | java | public List<Issue> getGroupIssues(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"groups", getGroupIdOrPath(groupIdOrPath), "milestones", milestoneId, "issues");
return (response.readEntity(new GenericType<List<Issue>>() {}));
} | [
"public",
"List",
"<",
"Issue",
">",
"getGroupIssues",
"(",
"Object",
"groupIdOrPath",
",",
"Integer",
"milestoneId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"getDefaultPerPage... | Get the list of issues associated with the specified group milestone.
@param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
@param milestoneId the milestone ID to get the issues for
@return a List of Issue for the milestone
@throws GitLabApiException if any exception occurs | [
"Get",
"the",
"list",
"of",
"issues",
"associated",
"with",
"the",
"specified",
"group",
"milestone",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L145-L149 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MilestonesApi.java | MilestonesApi.getGroupMergeRequest | public List<MergeRequest> getGroupMergeRequest(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"groups", getGroupIdOrPath(groupIdOrPath), "milestones", milestoneId, "merge_requests");
return (response.readEntity(new GenericType<List<MergeRequest>>() {}));
} | java | public List<MergeRequest> getGroupMergeRequest(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"groups", getGroupIdOrPath(groupIdOrPath), "milestones", milestoneId, "merge_requests");
return (response.readEntity(new GenericType<List<MergeRequest>>() {}));
} | [
"public",
"List",
"<",
"MergeRequest",
">",
"getGroupMergeRequest",
"(",
"Object",
"groupIdOrPath",
",",
"Integer",
"milestoneId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"getD... | Get the list of merge requests associated with the specified group milestone.
@param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
@param milestoneId the milestone ID to get the merge requests for
@return a list of merge requests associated with the specified milestone
@throws GitLabApiException if any exception occurs | [
"Get",
"the",
"list",
"of",
"merge",
"requests",
"associated",
"with",
"the",
"specified",
"group",
"milestone",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L159-L163 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MilestonesApi.java | MilestonesApi.createGroupMilestone | public Milestone createGroupMilestone(Object groupIdOrPath, String title, String description, Date dueDate, Date startDate) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("title", title, true)
.withParam("description", description)
.withParam("due_date", dueDate)
.withParam("start_date", startDate);
Response response = post(Response.Status.CREATED, formData,
"groups", getGroupIdOrPath(groupIdOrPath), "milestones");
return (response.readEntity(Milestone.class));
} | java | public Milestone createGroupMilestone(Object groupIdOrPath, String title, String description, Date dueDate, Date startDate) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("title", title, true)
.withParam("description", description)
.withParam("due_date", dueDate)
.withParam("start_date", startDate);
Response response = post(Response.Status.CREATED, formData,
"groups", getGroupIdOrPath(groupIdOrPath), "milestones");
return (response.readEntity(Milestone.class));
} | [
"public",
"Milestone",
"createGroupMilestone",
"(",
"Object",
"groupIdOrPath",
",",
"String",
"title",
",",
"String",
"description",
",",
"Date",
"dueDate",
",",
"Date",
"startDate",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
... | Create a group milestone.
@param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
@param title the title for the milestone
@param description the description for the milestone
@param dueDate the due date for the milestone
@param startDate the start date for the milestone
@return the created Milestone instance
@throws GitLabApiException if any exception occurs | [
"Create",
"a",
"group",
"milestone",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L176-L185 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MilestonesApi.java | MilestonesApi.closeGroupMilestone | public Milestone closeGroupMilestone(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException {
if (milestoneId == null) {
throw new RuntimeException("milestoneId cannot be null");
}
GitLabApiForm formData = new GitLabApiForm().withParam("state_event", MilestoneState.CLOSE);
Response response = put(Response.Status.OK, formData.asMap(),
"groups", getGroupIdOrPath(groupIdOrPath), "milestones", milestoneId);
return (response.readEntity(Milestone.class));
} | java | public Milestone closeGroupMilestone(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException {
if (milestoneId == null) {
throw new RuntimeException("milestoneId cannot be null");
}
GitLabApiForm formData = new GitLabApiForm().withParam("state_event", MilestoneState.CLOSE);
Response response = put(Response.Status.OK, formData.asMap(),
"groups", getGroupIdOrPath(groupIdOrPath), "milestones", milestoneId);
return (response.readEntity(Milestone.class));
} | [
"public",
"Milestone",
"closeGroupMilestone",
"(",
"Object",
"groupIdOrPath",
",",
"Integer",
"milestoneId",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"milestoneId",
"==",
"null",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"milestoneId cannot be n... | Close a group milestone.
@param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance
@param milestoneId the milestone ID to close
@return the closed Milestone instance
@throws GitLabApiException if any exception occurs | [
"Close",
"a",
"group",
"milestone",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L195-L205 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MilestonesApi.java | MilestonesApi.getMilestones | public Pager<Milestone> getMilestones(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Milestone>(this, Milestone.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "milestones"));
} | java | public Pager<Milestone> getMilestones(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Milestone>(this, Milestone.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "milestones"));
} | [
"public",
"Pager",
"<",
"Milestone",
">",
"getMilestones",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Milestone",
">",
"(",
"this",
",",
"Milestone",
".",
"class"... | Get a Page of project milestones.
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param itemsPerPage The number of Milestone instances that will be fetched per page
@return the milestones associated with the specified project
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"Page",
"of",
"project",
"milestones",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L292-L295 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MilestonesApi.java | MilestonesApi.getMilestonesStream | public Stream<Milestone> getMilestonesStream(Object projectIdOrPath) throws GitLabApiException {
return (getMilestones(projectIdOrPath, getDefaultPerPage()).stream());
} | java | public Stream<Milestone> getMilestonesStream(Object projectIdOrPath) throws GitLabApiException {
return (getMilestones(projectIdOrPath, getDefaultPerPage()).stream());
} | [
"public",
"Stream",
"<",
"Milestone",
">",
"getMilestonesStream",
"(",
"Object",
"projectIdOrPath",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getMilestones",
"(",
"projectIdOrPath",
",",
"getDefaultPerPage",
"(",
")",
")",
".",
"stream",
"(",
")",
... | Get a Stream of project milestones.
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@return a Stream of the milestones associated with the specified project
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"Stream",
"of",
"project",
"milestones",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L304-L306 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MilestonesApi.java | MilestonesApi.getMilestones | public List<Milestone> getMilestones(Object projectIdOrPath, MilestoneState state) throws GitLabApiException {
Form formData = new GitLabApiForm().withParam("state", state).withParam(PER_PAGE_PARAM, getDefaultPerPage());
Response response = get(Response.Status.OK, formData.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "milestones");
return (response.readEntity(new GenericType<List<Milestone>>() {}));
} | java | public List<Milestone> getMilestones(Object projectIdOrPath, MilestoneState state) throws GitLabApiException {
Form formData = new GitLabApiForm().withParam("state", state).withParam(PER_PAGE_PARAM, getDefaultPerPage());
Response response = get(Response.Status.OK, formData.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "milestones");
return (response.readEntity(new GenericType<List<Milestone>>() {}));
} | [
"public",
"List",
"<",
"Milestone",
">",
"getMilestones",
"(",
"Object",
"projectIdOrPath",
",",
"MilestoneState",
"state",
")",
"throws",
"GitLabApiException",
"{",
"Form",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"\"state\"",
"... | Get a list of project milestones that have the specified state.
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param state the milestone state
@return the milestones associated with the specified project and state
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"list",
"of",
"project",
"milestones",
"that",
"have",
"the",
"specified",
"state",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L316-L321 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MilestonesApi.java | MilestonesApi.getMilestone | public Milestone getMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "milestones", milestoneId);
return (response.readEntity(Milestone.class));
} | java | public Milestone getMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "milestones", milestoneId);
return (response.readEntity(Milestone.class));
} | [
"public",
"Milestone",
"getMilestone",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"milestoneId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"getDefaultPerPageParam",
"(",
")"... | Get the specified milestone.
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param milestoneId the ID of the milestone tp get
@return a Milestone instance for the specified IDs
@throws GitLabApiException if any exception occurs | [
"Get",
"the",
"specified",
"milestone",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L365-L369 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MilestonesApi.java | MilestonesApi.getIssues | public List<Issue> getIssues(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "milestones", milestoneId, "issues");
return (response.readEntity(new GenericType<List<Issue>>() {}));
} | java | public List<Issue> getIssues(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "milestones", milestoneId, "issues");
return (response.readEntity(new GenericType<List<Issue>>() {}));
} | [
"public",
"List",
"<",
"Issue",
">",
"getIssues",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"milestoneId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"getDefaultPerPagePar... | Get the list of issues associated with the specified milestone.
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param milestoneId the milestone ID to get the issues for
@return a List of Issue for the milestone
@throws GitLabApiException if any exception occurs | [
"Get",
"the",
"list",
"of",
"issues",
"associated",
"with",
"the",
"specified",
"milestone",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L379-L383 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MilestonesApi.java | MilestonesApi.getMergeRequest | public List<MergeRequest> getMergeRequest(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "milestones", milestoneId, "merge_requests");
return (response.readEntity(new GenericType<List<MergeRequest>>() {}));
} | java | public List<MergeRequest> getMergeRequest(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "milestones", milestoneId, "merge_requests");
return (response.readEntity(new GenericType<List<MergeRequest>>() {}));
} | [
"public",
"List",
"<",
"MergeRequest",
">",
"getMergeRequest",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"milestoneId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"getDefa... | Get the list of merge requests associated with the specified milestone.
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param milestoneId the milestone ID to get the merge requests for
@return a list of merge requests associated with the specified milestone
@throws GitLabApiException if any exception occurs | [
"Get",
"the",
"list",
"of",
"merge",
"requests",
"associated",
"with",
"the",
"specified",
"milestone",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L393-L397 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MilestonesApi.java | MilestonesApi.createMilestone | public Milestone createMilestone(Object projectIdOrPath, String title, String description, Date dueDate, Date startDate) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("title", title, true)
.withParam("description", description)
.withParam("due_date", dueDate)
.withParam("start_date", startDate);
Response response = post(Response.Status.CREATED, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "milestones");
return (response.readEntity(Milestone.class));
} | java | public Milestone createMilestone(Object projectIdOrPath, String title, String description, Date dueDate, Date startDate) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("title", title, true)
.withParam("description", description)
.withParam("due_date", dueDate)
.withParam("start_date", startDate);
Response response = post(Response.Status.CREATED, formData,
"projects", getProjectIdOrPath(projectIdOrPath), "milestones");
return (response.readEntity(Milestone.class));
} | [
"public",
"Milestone",
"createMilestone",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"title",
",",
"String",
"description",
",",
"Date",
"dueDate",
",",
"Date",
"startDate",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"... | Create a milestone.
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param title the title for the milestone
@param description the description for the milestone
@param dueDate the due date for the milestone
@param startDate the start date for the milestone
@return the created Milestone instance
@throws GitLabApiException if any exception occurs | [
"Create",
"a",
"milestone",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L410-L419 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MilestonesApi.java | MilestonesApi.activateMilestone | public Milestone activateMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException {
if (milestoneId == null) {
throw new RuntimeException("milestoneId cannot be null");
}
GitLabApiForm formData = new GitLabApiForm().withParam("state_event", MilestoneState.ACTIVATE);
Response response = put(Response.Status.OK, formData.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "milestones", milestoneId);
return (response.readEntity(Milestone.class));
} | java | public Milestone activateMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException {
if (milestoneId == null) {
throw new RuntimeException("milestoneId cannot be null");
}
GitLabApiForm formData = new GitLabApiForm().withParam("state_event", MilestoneState.ACTIVATE);
Response response = put(Response.Status.OK, formData.asMap(),
"projects", getProjectIdOrPath(projectIdOrPath), "milestones", milestoneId);
return (response.readEntity(Milestone.class));
} | [
"public",
"Milestone",
"activateMilestone",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"milestoneId",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"milestoneId",
"==",
"null",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"milestoneId cannot be n... | Activate a milestone.
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param milestoneId the milestone ID to activate
@return the activated Milestone instance
@throws GitLabApiException if any exception occurs | [
"Activate",
"a",
"milestone",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L449-L459 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.