Interface IBugtrackerService
- All Known Implementing Classes:
RedmineComponentService
public interface IBugtrackerService
IBugtrackerService : bugtracker integration (Redmine implementation) for the release workflow.
-
Method Summary
Modifier and TypeMethodDescriptionfindProjectIdentifier(String strScmUrl) Finds the identifier of the bugtracker project whose repository URL matches the given SCM URL.booleanTells whether a projects index (possibly stale) is available for lookups.voidinit()Inits the service (connection to the bugtracker server).booleanChecks live that the bugtracker server answers (cheap API call).voidpopulateBugtrackerInfo(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.fr.paris.lutece.util.json.ErrorJsonResponseprepareReleaseInBugtracker(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).voidupdateComponentVersions(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
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 releasedcommandResult- 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
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
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 releasebForce- true when the user confirmed a previous promptbCreateProject- true when the user confirmed the project creationbSkipCreate- true to skip the project creation step (after a failed creation)strDescription- the project description entered by the userbPublic- whether the project to create is public- Returns:
- the error response (prompt or warning), or null to proceed
-