本文整理匯總了Java中com.atlassian.bitbucket.event.pull.PullRequestRescopedEvent類的典型用法代碼示例。如果您正苦於以下問題:Java PullRequestRescopedEvent類的具體用法?Java PullRequestRescopedEvent怎麽用?Java PullRequestRescopedEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PullRequestRescopedEvent類屬於com.atlassian.bitbucket.event.pull包,在下文中一共展示了PullRequestRescopedEvent類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onPullRequestRescoped
import com.atlassian.bitbucket.event.pull.PullRequestRescopedEvent; //導入依賴的package包/類
@EventListener
public void onPullRequestRescoped(PullRequestRescopedEvent event) {
PullRequestRef ref = event.getPullRequest().getFromRef();
String previousFromHash = event.getPreviousFromHash();
String currentFromHash = ref.getLatestCommit();
if (currentFromHash.equals(previousFromHash)) {
return;
}
if (ref.getDisplayId().toLowerCase().contains("bugfix/")) {
TriggerBuildFromPullRequest(ref, "usePrFrombugFix", "bugFixRule");
}
if (ref.getDisplayId().toLowerCase().contains("feature/")) {
TriggerBuildFromPullRequest(ref, "usePrFromFeature", "featureRule");
}
if (ref.getDisplayId().toLowerCase().contains("hotfix/")) {
TriggerBuildFromPullRequest(ref, "usePrFromhotFix", "hotFixRule");
}
}
開發者ID:TrimbleSolutionsCorporation,項目名稱:TeamcityTriggerHook,代碼行數:23,代碼來源:TeamcityPullrequestEventListener.java
示例2: onPullRequestRescoped
import com.atlassian.bitbucket.event.pull.PullRequestRescopedEvent; //導入依賴的package包/類
@EventListener
public void onPullRequestRescoped(PullRequestRescopedEvent event)
{
// see this atlassian page for explanation of the logic in this handler:
// https://answers.atlassian.com/questions/239988
// only trigger when changes were pushed to the "from" side of the PR
if (event.isFromHashUpdated())
{
sendPullRequestEvent(event, EventType.PULL_REQUEST_RESCOPED, true);
}
}
示例3: onPullRequestRescoped
import com.atlassian.bitbucket.event.pull.PullRequestRescopedEvent; //導入依賴的package包/類
@EventListener
public void onPullRequestRescoped(PullRequestRescopedEvent event)
{
boolean checkFromRefChanged = repositoryInformationService.CheckFromRefChanged(event.getPullRequest().getToRef().getRepository());
String previousHash = event.getPreviousFromHash();
String newHash = event.getPullRequest().getFromRef().getLatestCommit();
if(!checkFromRefChanged || previousHash == null || newHash == null || !previousHash.equals(newHash))
{
HandlePullRequestEvent(event.getPullRequest());
}
}