当前位置: 首页>>代码示例>>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;未经允许,请勿转载。