public class StashRepository extends Object
Constructor and Description |
---|
StashRepository(hudson.model.Job<?,?> job,
StashBuildTrigger trigger,
StashApiClient client,
StashPollingAction pollLog) |
Modifier and Type | Method and Description |
---|---|
void |
deletePullRequestComment(String pullRequestId,
String commentId)
Deletes pull request comment from Bitbucket Server
|
static AbstractMap.SimpleEntry<String,String> |
getParameter(String content) |
Collection<StashPullRequestResponseValue> |
getTargetPullRequests() |
Optional<String> |
mergePullRequest(String pullRequestId,
String version)
Instructs Bitbucket Server to merge pull request
|
void |
pollRepository() |
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, StashApiClient client, StashPollingAction pollLog)
public Collection<StashPullRequestResponseValue> getTargetPullRequests()
@Nullable public static AbstractMap.SimpleEntry<String,String> getParameter(String content)
@Nullable public hudson.model.Queue.Item startJob(StashCause cause)
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)
@Nonnull public Optional<String> mergePullRequest(String pullRequestId, String version) throws StashApiClient.StashApiException
pullRequestId
- pull request IDversion
- pull request versionStashApiClient.StashApiException
- if cannot communicate to the serverpublic void pollRepository()
Copyright © 2016–2020. All rights reserved.