public void run() { for (SCMSource scmSource : ((SCMSourceOwner) project).getSCMSources()) { if (scmSource instanceof GitSCMSource) { GitSCMSource gitSCMSource = (GitSCMSource) scmSource; try { if (new URIish(gitSCMSource.getRemote()).equals(new URIish(gitSCMSource.getRemote()))) { if (!gitSCMSource.isIgnoreOnPushNotifications()) { LOGGER.log(Level.FINE, "Notify scmSourceOwner {0} about changes for {1}", toArray(project.getName(), gitSCMSource.getRemote())); ((SCMSourceOwner) project).onSCMSourceUpdated(scmSource); } else { LOGGER.log(Level.FINE, "Ignore on push notification for scmSourceOwner {0} about changes for {1}", toArray(project.getName(), gitSCMSource.getRemote())); } } } catch (URISyntaxException e) { // nothing to do } } } } }
final SCMRevision scmRevision = scmRevisionAction.getRevision();
/** * {@inheritDoc} */ @Override protected void process(GiteaPullSCMEvent event) { SCMHeadEvent.fireNow(event); } }
@Override public void retrieve(String name, String version, boolean changelog, FilePath target, Run<?, ?> run, TaskListener listener) throws Exception { SCMRevision revision = scm.fetch(version, listener); if (revision == null) { throw new AbortException("No version " + version + " found for library " + name); } doRetrieve(name, changelog, scm.build(revision.getHead(), revision), target, run, listener); }
/** * {@inheritDoc} */ @Override public boolean includeCategory(@NonNull SCMHeadCategory category) { return category.isUncategorized(); }
/** * {@inheritDoc} */ @Override protected boolean isCategoryEnabled(@NonNull SCMHeadCategory category) { if (category instanceof TagSCMHeadCategory) { return new GitSCMSourceContext<>(null, SCMHeadObserver.none()).withTraits(getTraits()).wantTags(); } return super.isCategoryEnabled(category); }
@Override public AbstractGitSCMSource.SCMRevisionImpl getRevision() { return (AbstractGitSCMSource.SCMRevisionImpl) super.getRevision(); }
/** * {@inheritDoc} */ @Override protected void process(GiteaRepositorySCMEvent event) { SCMSourceEvent.fireNow(event); } }
/** * {@inheritDoc} */ @Override protected Set<String> retrieveRevisions(TaskListener listener) throws IOException, InterruptedException { // Default implementation should do what we need: normally includes tags as well as branches. return super.retrieveRevisions(listener); }
private GitLabSCMHeadCategory(SCMHeadCategory delegate) { super(delegate.getName(), delegate.getDisplayName()); this.delegate = delegate; }
@Override public void writeBody(PrintWriter w) { w.println("Scheduled indexing of " + owner.getFullDisplayName()); } });
@Override protected boolean isApplicable(@Nullable Item item) { if (item instanceof SCMNavigatorOwner) { for (SCMNavigator navigator : ((SCMNavigatorOwner) item).getSCMNavigators()) { if (navigator instanceof GitHubSCMNavigator) { return true; // TODO allow navigators to opt-out } } } return false; }
@Override protected SCMRevision retrieve(@Nonnull SCMHead head, @Nonnull TaskListener listener) throws IOException, InterruptedException { return super.retrieve(head, listener); }
@Override public void addHeaders(StaplerRequest req, StaplerResponse rsp) { rsp.addHeader("Triggered", owner.getAbsoluteUrl()); }
/** * {@inheritDoc} */ @Override protected void process(GiteaCreateSCMEvent event) { SCMHeadEvent.fireNow(event); } }
/** * {@inheritDoc} */ @Override public boolean includeCategory(@NonNull SCMHeadCategory category) { return category.isUncategorized(); }
@Override public SubversionSCMSource.SCMRevisionImpl getRevision() { return (SCMRevisionImpl) super.getRevision(); }
/** * {@inheritDoc} */ @Override protected void process(GiteaPushSCMEvent event) { SCMHeadEvent.fireNow(event); } }
/** * {@inheritDoc} */ @Override public boolean includeCategory(@NonNull SCMHeadCategory category) { return category.isUncategorized(); }