Interface JiraBranchLinkingService

    • Method Detail

      • linkBranchToIssueIfRequiredAsync

        void linkBranchToIssueIfRequiredAsync​(@NotNull
                                              @NotNull PlanKey planKey,
                                              @Nullable
                                              @Nullable String username)
        Looks for an issue key in the branch name. If found will link the branch to the issue. And attempt to create a remote link from the issue to the branch. However this may fail. Check ChainBranchIdentifier.isRemoteJiraLinkRequired() to see if remote link succeeded.
        Parameters:
        planKey - of branch to link
        username - (optional) to use for authentication if possible/required
      • findIssueKeyToLink

        @Nullable
        @Nullable String findIssueKeyToLink​(@NotNull
                                            @NotNull ImmutableChainBranch branch)
        Looks for an issue key in plan branch name or vcs branch name. Will only return the first issue found. Only uses regex. No validation is performed for whether its a valid issue.
        Parameters:
        branch - to find the issue for
        Returns:
        issueKey if one exists.