当前位置: 首页>>代码示例>>Java>>正文


Java SCMSourceEvent类代码示例

本文整理汇总了Java中jenkins.scm.api.SCMSourceEvent的典型用法代码示例。如果您正苦于以下问题:Java SCMSourceEvent类的具体用法?Java SCMSourceEvent怎么用?Java SCMSourceEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SCMSourceEvent类属于jenkins.scm.api包,在下文中一共展示了SCMSourceEvent类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: retrieveActions

import jenkins.scm.api.SCMSourceEvent; //导入依赖的package包/类
@NonNull
@Override
protected List<Action> retrieveActions(SCMSourceEvent event, @NonNull TaskListener listener)
        throws IOException, InterruptedException {
    if (giteaRepository == null) {
        try (GiteaConnection c = gitea().open()) {
            listener.getLogger().format("Looking up repository %s/%s%n", repoOwner, repository);
            giteaRepository = c.fetchRepository(repoOwner, repository);
        }
    }
    List<Action> result = new ArrayList<>();
    result.add(new ObjectMetadataAction(null, giteaRepository.getDescription(), giteaRepository.getWebsite()));
    result.add(new GiteaLink("icon-gitea-repo", UriTemplate.buildFromTemplate(serverUrl)
            .path(UriTemplateBuilder.var("owner"))
            .path(UriTemplateBuilder.var("repository"))
            .build()
            .set("owner", repoOwner)
            .set("repository", repository)
            .expand()
    ));
    return result;
}
 
开发者ID:jenkinsci,项目名称:gitea-plugin,代码行数:23,代码来源:GiteaSCMSource.java

示例2: handleSystemHook

import jenkins.scm.api.SCMSourceEvent; //导入依赖的package包/类
private void handleSystemHook(String id, HttpServletRequest request) throws IOException {
    try {
        LOGGER.fine("handling system-hook for " + id);
        SystemHook hook = readHook(SystemHook.class, request);
        SCMSourceEvent.fireNow(GitLabSCMSourceEvent.create(id, hook, originOf(request)));
    } catch (IllegalArgumentException e) {
        LOGGER.warning("ignoring system hook: " + e.getMessage());
    }
}
 
开发者ID:Argelbargel,项目名称:gitlab-branch-source-plugin,代码行数:10,代码来源:HookHandler.java

示例3: retrieve

import jenkins.scm.api.SCMSourceEvent; //导入依赖的package包/类
@Nonnull
List<Action> retrieve(@CheckForNull SCMSourceEvent event, @Nonnull TaskListener listener) throws IOException {
    GitLabProject project = source.getProject();
    return asList(
            new ObjectMetadataAction(project.getNameWithNamespace(), project.getDescription(), project.getWebUrl()),
            new GitLabProjectAvatarMetadataAction(project.getId(), source.getSourceSettings().getConnectionName()),
            GitLabLinkAction.toProject(project));
}
 
开发者ID:Argelbargel,项目名称:gitlab-branch-source-plugin,代码行数:9,代码来源:SourceActions.java

示例4: process

import jenkins.scm.api.SCMSourceEvent; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void process(GiteaRepositorySCMEvent event) {
    SCMSourceEvent.fireNow(event);
}
 
开发者ID:jenkinsci,项目名称:gitea-plugin,代码行数:8,代码来源:GiteaRepositorySCMEvent.java

示例5: visitSources

import jenkins.scm.api.SCMSourceEvent; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void visitSources(@NonNull SCMSourceObserver observer, @NonNull SCMSourceEvent<?> event)
        throws IOException, InterruptedException {
    visitSource(event.getSourceName(), observer);
}
 
开发者ID:stephenc,项目名称:asf-gitpubsub-jenkins-plugin,代码行数:9,代码来源:ASFGitSCMNavigator.java

示例6: retrieveActions

import jenkins.scm.api.SCMSourceEvent; //导入依赖的package包/类
@Nonnull
@Override
protected List<Action> retrieveActions(@CheckForNull SCMSourceEvent event, @Nonnull TaskListener listener) throws IOException {
    return actions.retrieve(event, listener);
}
 
开发者ID:Argelbargel,项目名称:gitlab-branch-source-plugin,代码行数:6,代码来源:GitLabSCMSource.java


注:本文中的jenkins.scm.api.SCMSourceEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。