public class StashRepository extends Object
| Constructor and Description |
|---|
StashRepository(hudson.model.Job<?,?> job,
StashBuildTrigger trigger) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFutureBuildTasks(Collection<StashPullRequestResponseValue> pullRequests) |
void |
deletePullRequestComment(String pullRequestId,
String commentId)
Deletes pull request comment from Bitbucket Server
|
Map<String,String> |
getAdditionalParameters(StashPullRequestResponseValue pullRequest) |
static AbstractMap.SimpleEntry<String,String> |
getParameter(String content) |
static Map<String,String> |
getParametersFromContent(String content) |
Collection<StashPullRequestResponseValue> |
getTargetPullRequests() |
boolean |
mergePullRequest(String pullRequestId,
String version)
Instructs Bitbucket Server to merge pull request
|
String |
postBuildStartCommentTo(StashPullRequestResponseValue pullRequest)
Post "BuildStarted" comment to Bitbucket Server
|
void |
postFinishedComment(String pullRequestId,
String sourceCommit,
String destinationCommit,
hudson.model.Result buildResult,
String buildUrl,
int buildNumber,
String additionalComment,
String duration) |
hudson.model.Queue.Item |
startJob(StashCause cause) |
public StashRepository(@Nonnull hudson.model.Job<?,?> job, @Nonnull StashBuildTrigger trigger)
public Collection<StashPullRequestResponseValue> getTargetPullRequests()
public String postBuildStartCommentTo(StashPullRequestResponseValue pullRequest) throws StashApiClient.StashApiException
pullRequest - pull requestStashApiClient.StashApiException - if posting the comment failspublic static AbstractMap.SimpleEntry<String,String> getParameter(String content)
public Map<String,String> getAdditionalParameters(StashPullRequestResponseValue pullRequest) throws StashApiClient.StashApiException
StashApiClient.StashApiExceptionpublic hudson.model.Queue.Item startJob(StashCause cause)
public void addFutureBuildTasks(Collection<StashPullRequestResponseValue> pullRequests)
public void deletePullRequestComment(String pullRequestId, String commentId) throws StashApiClient.StashApiException
pullRequestId - pull request IDcommentId - comment to be deletedStashApiClient.StashApiException - if deleting the comment failspublic void postFinishedComment(String pullRequestId, String sourceCommit, String destinationCommit, hudson.model.Result buildResult, String buildUrl, int buildNumber, String additionalComment, String duration)
public boolean mergePullRequest(String pullRequestId, String version) throws StashApiClient.StashApiException
pullRequestId - pull request IDversion - pull request versionStashApiClient.StashApiException - if cannot communicate to the serverCopyright © 2016–2019. All rights reserved.