本文整理汇总了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());
}
}