Interface IBugtrackerService

All Known Implementing Classes:
RedmineComponentService

public interface IBugtrackerService
IBugtrackerService : bugtracker integration (Redmine implementation) for the release workflow.
  • Method Summary

    Modifier and Type
    Method
    Description
    Finds the identifier of the bugtracker project whose repository URL matches the given SCM URL.
    boolean
    Tells whether a projects index (possibly stale) is available for lookups.
    void
    Inits the service (connection to the bugtracker server).
    boolean
    Checks live that the bugtracker server answers (cheap API call).
    void
    Populates the bugtracker informations of a component : the roadmap URL when a project matches its repository, or an informative release comment (GitHub only) when no project matches.
    fr.paris.lutece.util.json.ErrorJsonResponse
    prepareReleaseInBugtracker(Component component, boolean bForce, boolean bCreateProject, boolean bSkipCreate, String strDescription, boolean bPublic)
    Checks the bugtracker prerequisites before launching a component release : bugtracker reachable, project existing (created on user confirmation).
    void
    updateComponentVersions(Component component, CommandResult commandResult)
    Updates the bugtracker versions for a released component : creates the next open version, moves the still-open issues of the released version onto it, then closes the released version.
  • Method Details

    • init

      void init()
      Inits the service (connection to the bugtracker server).
    • updateComponentVersions

      void updateComponentVersions(Component component, CommandResult commandResult)
      Updates the bugtracker versions for a released component : creates the next open version, moves the still-open issues of the released version onto it, then closes the released version. If no bugtracker project matches the component repository, the project is created first.
      Parameters:
      component - the component being released
      commandResult - the command result (release console)
    • isReachable

      boolean isReachable()
      Checks live that the bugtracker server answers (cheap API call).
      Returns:
      true if the bugtracker is reachable
    • hasProjectIndex

      boolean hasProjectIndex()
      Tells whether a projects index (possibly stale) is available for lookups.
      Returns:
      true if an index is available
    • findProjectIdentifier

      String findProjectIdentifier(String strScmUrl)
      Finds the identifier of the bugtracker project whose repository URL matches the given SCM URL.
      Parameters:
      strScmUrl - the component SCM URL (scm:git:... accepted)
      Returns:
      the project identifier, or null if none matches or no index is available
    • populateBugtrackerInfo

      void populateBugtrackerInfo(Component component)
      Populates the bugtracker informations of a component : the roadmap URL when a project matches its repository, or an informative release comment (GitHub only) when no project matches. Silently skipped when the projects index is unavailable (bugtracker down).
      Parameters:
      component - the component
    • prepareReleaseInBugtracker

      fr.paris.lutece.util.json.ErrorJsonResponse prepareReleaseInBugtracker(Component component, boolean bForce, boolean bCreateProject, boolean bSkipCreate, String strDescription, boolean bPublic)
      Checks the bugtracker prerequisites before launching a component release : bugtracker reachable, project existing (created on user confirmation). Returns the error response to send back to the user, or null if the release can start.
      Parameters:
      component - the component to release
      bForce - true when the user confirmed a previous prompt
      bCreateProject - true when the user confirmed the project creation
      bSkipCreate - true to skip the project creation step (after a failed creation)
      strDescription - the project description entered by the user
      bPublic - whether the project to create is public
      Returns:
      the error response (prompt or warning), or null to proceed