Class SpaceLinkBuilder


  • public class SpaceLinkBuilder
    extends Object
    Utility class for the creation of user-facing URLs to Space resources. This class obeys the internal property teamcity.internal.connection.space.linkHostOverride.{connectionId}
    Since:
    2024.12
    See Also:
    SpaceFeatures.linkHostOverride(String)
    • Constructor Detail

      • SpaceLinkBuilder

        public SpaceLinkBuilder()
    • Method Detail

      • buildForRepository

        @NotNull
        public String buildForRepository​(@NotNull
                                         OAuthConnectionDescriptor connection,
                                         @NotNull
                                         String projectKey,
                                         @NotNull
                                         String repository)
        Builds a URL for users to view a Space repository. The URL can be used as a base for links to individual commits. URL format: https://{host}/p/{projectKey}/repositories/{repository}
        Parameters:
        connection - the Space connection
        projectKey - the Space project key
        repository - the Space repository
        Returns:
        the constructed URL
        Since:
        2024.12
      • buildForCodeReview

        public String buildForCodeReview​(@NotNull
                                         OAuthConnectionDescriptor connection,
                                         @NotNull
                                         String projectKey,
                                         @NotNull
                                         String reviewId)
        Builda URL for users to view code reviews and merge requests. URL format: https://{host}/p/{projectKey}/reviews/{reviewId}/timeline
        Parameters:
        connection - the Space connection
        projectKey - the Space project key
        reviewId - the review ID
        Returns:
        the constructed URL
        Since:
        2024.12