Interface BambooSpecsHandler

    • Field Detail

      • BAMBOO_SPECS_DIRECTORY

        static final String BAMBOO_SPECS_DIRECTORY
        Directory in which Bamboo Specs are stored within a repository.
    • Method Detail

      • detectSpecRevision

        @NotNull
        @NotNull Optional<String> detectSpecRevision​(@NotNull
                                                     @NotNull VcsRepositoryData repositoryData,
                                                     @NotNull
                                                     @NotNull Object source)
                                              throws RepositoryException
        Attempts to obtain latest revision from the repository which may have changed Bamboo Specs.
        Parameters:
        repositoryData - repository
        source - entry point to begin scanning (for example: branch name), actual type may depend on repository type
        Returns:
        latest revision or Optional.empty() if BAMBOO_SPECS_DIRECTORY doesn't exist.
        Throws:
        RepositoryException
      • isNewer

        boolean isNewer​(@NotNull
                        @NotNull VcsRepositoryData repositoryData,
                        @NotNull
                        @NotNull String rev1,
                        @NotNull
                        @NotNull String rev2)
                 throws RepositoryException
        Returns true if rev2 is a newer revision in the repository than rev1 and therefore the specs should be run. In typical cases, returns true if it is possible to reach rev1 by following parent relationship starting from rev2. Exceptional cases involve suspected force push or 'clear' merges that don't result in changes in specs being connected to the merge commit. In those cases it assumed that rev2 is newer even though no ancestry path exists between rev1 and rev2.
        Throws:
        RepositoryException
      • isWebhookRequired

        boolean isWebhookRequired()
        Returns:
        true if vcs requires setting webhook for Bamboo Specs processing, false otherwise
      • supportsDivergentBranches

        default boolean supportsDivergentBranches()
        Returns:
        true if repository type supports divergent branches, false otherwise
      • divergentBranchesEnabled

        default boolean divergentBranchesEnabled​(@NotNull
                                                 @NotNull VcsRepositoryData vcsRepositoryData)
        Returns:
        true if particular repository data supports divergent branches, false otherwise