<commit_before>/**
 * Copyright (c) 2016, All Contributors (see CONTRIBUTORS file)
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package org.cicomponents.ci;

import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.cicomponents.*;
import org.cicomponents.git.GitRevision;
import org.cicomponents.git.GitRevisionEmitter;
import org.cicomponents.github.GithubOAuthTokenProvider;
import org.cicomponents.github.GithubPullRequest;
import org.cicomponents.github.GithubPullRequestEmitter;
import org.eclipse.jgit.api.Git;
import org.gradle.tooling.*;
import org.kohsuke.github.GHCommitState;
import org.osgi.service.component.annotations.*;

import java.io.OutputStream;
import java.util.concurrent.CompletableFuture;
import java.util.function.Supplier;

/**
 * This is a CI Components build orchestration service.
 *
 * This service implements {@link ResourceListener} for {@link GitRevision} to receive Git-related events.
 */
@Slf4j
@Component(immediate = true, scope = ServiceScope.SINGLETON)
public class Build {

    /**
     * Reference to a master branch version emitter. Relies on cicomponents-git's <code>GitEmitterProvider</code>
     * which implements {@link org.osgi.framework.hooks.service.FindHook} to listen for filter inquieries.
     *
     * To override it, run this in the console:
     *
     * <pre>
     * config:edit org.cicomponents.ci.Build
     * config:property-set master.target "(&(type=latest)(repository=https://github.com/yourfork/cicomponents)(branch=master))"
     * config:update
     * </pre>
     *
     * Or edit etc/org.cicomponents.ci.Build.cfg:
     *
     * <pre>
     * master.target = (&(type=latest)(repository=https://github.com/yourfork/cicomponents)(branch=master))
     * </pre>
     *
     */
    @Reference(target = "(&(type=latest)(repository=https://github.com/cicomponents/cicomponents)(branch=master))")
    protected GitRevisionEmitter master;

    /**
     * Reference to a pull request version emitter.
     *
     * "(&(type=github-pr)(repository=https://github.com/yourfork/cicomponents))"
     *
     */
    @Reference(target = "(github-repository=cicomponents/cicomponents)")
    protected GithubPullRequestEmitter pullRequests;

    @Reference(target = "(github-repository=cicomponents/cicomponents)")
    protected GithubOAuthTokenProvider githubOAuthTokenProvider;

    /**
     * This service is used to create outputs
     */
    @Reference
    protected volatile OutputProviderService outputProviderService;

    @Reference
    protected volatile NodeConfiguration configuration;<commit_msg>Problem: outdated and incorrect target filter doc in own CI<commit_after>/**
 * Copyright (c) 2016, All Contributors (see CONTRIBUTORS file)
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package org.cicomponents.ci;

import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.cicomponents.*;
import org.cicomponents.git.GitRevision;
import org.cicomponents.git.GitRevisionEmitter;
import org.cicomponents.github.GithubOAuthTokenProvider;
import org.cicomponents.github.GithubPullRequest;
import org.cicomponents.github.GithubPullRequestEmitter;
import org.eclipse.jgit.api.Git;
import org.gradle.tooling.*;
import org.kohsuke.github.GHCommitState;
import org.osgi.service.component.annotations.*;

import java.io.OutputStream;
import java.util.concurrent.CompletableFuture;
import java.util.function.Supplier;

/**
 * This is a CI Components build orchestration service.
 *
 * This service implements {@link ResourceListener} for {@link GitRevision} to receive Git-related events.
 */
@Slf4j
@Component(immediate = true, scope = ServiceScope.SINGLETON)
public class Build {

    /**
     * Reference to a master branch version emitter. Relies on cicomponents-git's <code>GitEmitterProvider</code>
     * which implements {@link org.osgi.framework.hooks.service.FindHook} to listen for filter inquieries.
     *
     * To override it, run this in the console:
     *
     * <pre>
     * config:edit org.cicomponents.ci.Build
     * config:property-set master.target "(&(type=latest)(repository=https://github.com/yourfork/cicomponents)(branch=master))"
     * config:update
     * </pre>
     *
     * Or edit etc/org.cicomponents.ci.Build.cfg:
     *
     * <pre>
     * master.target = (&(type=latest)(repository=https://github.com/yourfork/cicomponents)(branch=master))
     * </pre>
     *
     */
    @Reference(target = "(&(type=latest)(repository=https://github.com/cicomponents/cicomponents)(branch=master))")
    protected GitRevisionEmitter master;

    /**
     * Reference to a pull request version emitter.
     *
     */
    @Reference(target = "(github-repository=cicomponents/cicomponents)")
    protected GithubPullRequestEmitter pullRequests;

    @Reference(target = "(github-repository=cicomponents/cicomponents)")
    protected GithubOAuthTokenProvider githubOAuthTokenProvider;

    /**
     * This service is used to create outputs
     */
    @Reference
    protected volatile OutputProviderService outputProviderService;

    @Reference
    protected volatile NodeConfiguration configuration;
{'fraction_non_alphanumeric': 0.11254374654632529, 'fraction_numerical': 0.004052311659605821, 'mean_word_length': 4.023126734505088, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4042156', 'n_tokens_mistral': 1687, 'n_tokens_neox': 1625, 'n_words': 379}