Interface VcsBranchDetector

    • Method Detail

      • usePollingForBranchDetection

        default boolean usePollingForBranchDetection​(@NotNull
                                                     @NotNull VcsRepositoryData repositoryData)
        Check if for specific repository configuration Bamboo needs to actively poll in order to detect new/deleted branches. If this method returns true, Bamboo will periodically contact the remote repository in order to update list of known branches. Return false if repository is capable of creating Bamboo Plan Branches using one of available "push" method, e.g. REST resource, remote event.
        Parameters:
        repositoryData -
        Returns:
      • getOpenBranches

        @NotNull
        @NotNull List<VcsBranch> getOpenBranches​(@NotNull
                                                 @NotNull VcsRepositoryData repositoryData)
                                          throws RepositoryException
        Set of open branches that are discovered in the repository. Returns empty collection if no branches at all (can that happen?). Used for monitoring repositories for new branches. An open branch is a branch that is considered 'open' by underlying VCS - it has nothing to do with the actual development on that branch (recent commits or so).
        Parameters:
        repositoryData -
        Returns:
        List of branch names. May be empty.
        Throws:
        RepositoryException
      • getLastCommit

        @NotNull
        @NotNull CommitContext getLastCommit​(@NotNull
                                             @NotNull VcsRepositoryData repositoryData)
                                      throws RepositoryException
        Retrieve last commit on the branch set on this Repository. Method is used by Chain Branch automatic expiry. If this method returns null Chain Branch is not expired.
        Returns:
        the last commit
        Throws:
        RepositoryException
      • getFirstCommitApproximation

        @NotNull
        default @NotNull CommitContext getFirstCommitApproximation​(@NotNull
                                                                   @NotNull VcsRepositoryData repositoryData)
                                                            throws RepositoryException
        Retrieve an old, preferably the first commit on a branch. Implementations must not return null. The default implementation may return null.
        Throws:
        RepositoryException