Package io.jenkins.plugins.monitoring
Class MonitoringMultibranchProjectAction
java.lang.Object
io.jenkins.plugins.monitoring.MonitoringMultibranchProjectAction
- All Implemented Interfaces:
Action,ModelObject,ProminentProjectAction
public class MonitoringMultibranchProjectAction
extends Object
implements ProminentProjectAction, Action
This action displays a link on the side panel of a
MultiBranchProject.
The action is responsible to render the basic overview of all open pull requests
via its associated 'index.jelly' view.- Author:
- Simon Symhoven
-
Constructor Summary
ConstructorsConstructorDescriptionMonitoringMultibranchProjectAction(jenkins.branch.MultiBranchProject<?, ?> multiBranchProject) Creates a new instance ofMonitoringMultibranchProjectAction. -
Method Summary
Modifier and TypeMethodDescriptionOptional<jenkins.scm.api.metadata.ContributorMetadataAction> getContributorMetaData(Job<?, ?> job) Get theContributorMetadataActionfor a given job, e.g.static Stringstatic StringOptional<jenkins.scm.api.metadata.ObjectMetadataAction> getObjectMetaData(Job<?, ?> job) Get theObjectMetadataActionfor a given job, e.g.jenkins.branch.MultiBranchProject<?, ?> Filters all jobs of selectedMultiBranchProjectby "Pull Request".jenkins.scm.api.mixin.ChangeRequestSCMHead2getScmHead(Job<?, ?> job) Get theChangeRequestSCMHead2for a specificJob.static StringgetURI()
-
Constructor Details
-
MonitoringMultibranchProjectAction
public MonitoringMultibranchProjectAction(jenkins.branch.MultiBranchProject<?, ?> multiBranchProject) Creates a new instance ofMonitoringMultibranchProjectAction.- Parameters:
multiBranchProject- the project that owns this action.
-
-
Method Details
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
getProject
public jenkins.branch.MultiBranchProject<?,?> getProject() -
getPullRequests
Filters all jobs of selectedMultiBranchProjectby "Pull Request".- Returns:
- filtered list of all
jobsby "Pull Request".
-
getScmHead
Get theChangeRequestSCMHead2for a specificJob.- Parameters:
job- the job to getChangeRequestSCMHead2for.- Returns:
- the
ChangeRequestSCMHead2of job.
-
getObjectMetaData
Get theObjectMetadataActionfor a given job, e.g. the name of the pull request and the link to the repository.- Parameters:
job- the job to getObjectMetadataActionfor.- Returns:
- the
ObjectMetadataActionfor the given job asOptional.
-
getContributorMetaData
public Optional<jenkins.scm.api.metadata.ContributorMetadataAction> getContributorMetaData(Job<?, ?> job) Get theContributorMetadataActionfor a given job, e.g. the name of the contributor.- Parameters:
job- the job to getContributorMetadataActionfor.- Returns:
- the
ContributorMetadataActionfor the given job asOptional.
-
getURI
-
getIconSmall
-
getIconBig
-