Class 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 Detail

      • MonitoringMultibranchProjectAction

        public MonitoringMultibranchProjectAction​(jenkins.branch.MultiBranchProject<?,​?> multiBranchProject)
        Creates a new instance of MonitoringMultibranchProjectAction.
        Parameters:
        multiBranchProject - the project that owns this action.
    • Method Detail

      • getProject

        public jenkins.branch.MultiBranchProject<?,​?> getProject()
      • getPullRequests

        public List<Job<?,​?>> getPullRequests()
        Filters all jobs of selected MultiBranchProject by "Pull Request".
        Returns:
        filtered list of all jobs by "Pull Request".
      • getScmHead

        public jenkins.scm.api.mixin.ChangeRequestSCMHead2 getScmHead​(Job<?,​?> job)
        Get the ChangeRequestSCMHead2 for a specific Job.
        Parameters:
        job - the job to get ChangeRequestSCMHead2 for.
        Returns:
        the ChangeRequestSCMHead2 of job.
      • getObjectMetaData

        public Optional<jenkins.scm.api.metadata.ObjectMetadataAction> getObjectMetaData​(Job<?,​?> job)
        Get the ObjectMetadataAction for a given job, e.g. the name of the pull request and the link to the repository.
        Parameters:
        job - the job to get ObjectMetadataAction for.
        Returns:
        the ObjectMetadataAction for the given job as Optional.
      • getContributorMetaData

        public Optional<jenkins.scm.api.metadata.ContributorMetadataAction> getContributorMetaData​(Job<?,​?> job)
        Get the ContributorMetadataAction for a given job, e.g. the name of the contributor.
        Parameters:
        job - the job to get ContributorMetadataAction for.
        Returns:
        the ContributorMetadataAction for the given job as Optional.
      • getURI

        public static String getURI()
      • getIconSmall

        public static String getIconSmall()
      • getIconBig

        public static String getIconBig()