當前位置: 首頁>>代碼示例>>Java>>正文


Java PullRequestRescopedEvent類代碼示例

本文整理匯總了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);
    }
}
 
開發者ID:Eernie,項目名稱:bitbucket-webhooks-plugin,代碼行數:13,代碼來源:PullRequestListener.java

示例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());
	}
}
 
開發者ID:wparad,項目名稱:stash-http-request-trigger,代碼行數:12,代碼來源:PostReceiveHook.java


注:本文中的com.atlassian.bitbucket.event.pull.PullRequestRescopedEvent類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。