本文整理匯總了Java中hudson.model.Run.getParent方法的典型用法代碼示例。如果您正苦於以下問題:Java Run.getParent方法的具體用法?Java Run.getParent怎麽用?Java Run.getParent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類hudson.model.Run
的用法示例。
在下文中一共展示了Run.getParent方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: PullRequestGroovyObject
import hudson.model.Run; //導入方法依賴的package包/類
public PullRequestGroovyObject(@Nonnull final CpsScript script) throws Exception {
this.script = script;
Run<?, ?> build = script.$build();
if (build == null) {
throw new IllegalStateException("No associated build");
}
Job job = build.getParent();
this.pullRequestHead = GitHubHelper.getPullRequest(job);
this.base = GitHubHelper.getRepositoryId(job);
this.head = RepositoryId.create(pullRequestHead.getSourceOwner(), pullRequestHead.getSourceRepo());
this.gitHubClient = GitHubHelper.getGitHubClient(job);
this.pullRequestService = new ExtendedPullRequestService(gitHubClient);
this.issueService = new ExtendedIssueService(gitHubClient);
this.commitService = new ExtendedCommitService(gitHubClient);
this.pullRequest = pullRequestService.getPullRequest(base, pullRequestHead.getNumber());
}