Class GHWorkflowJob


  • public class GHWorkflowJob
    extends GHObject
    A workflow run job.
    Author:
    Guillaume Smet
    • Constructor Detail

      • GHWorkflowJob

        public GHWorkflowJob()
    • Method Detail

      • getName

        public String getName()
        The name of the job.
        Returns:
        the name
      • getHeadSha

        public String getHeadSha()
        Gets the HEAD SHA.
        Returns:
        sha for the HEAD commit
      • getStartedAt

        public Date getStartedAt()
        When was this job started?
        Returns:
        start date
      • getCompletedAt

        public Date getCompletedAt()
        When was this job completed?
        Returns:
        completion date
      • getStatus

        public GHWorkflowRun.Status getStatus()
        Gets status of the job.

        Can be UNKNOWN if the value returned by GitHub is unknown from the API.

        Returns:
        status of the job
      • getConclusion

        public GHWorkflowRun.Conclusion getConclusion()
        Gets the conclusion of the job.

        Can be UNKNOWN if the value returned by GitHub is unknown from the API.

        Returns:
        conclusion of the job
      • getRunId

        public long getRunId()
        The run id.
        Returns:
        the run id
      • getHtmlUrl

        public URL getHtmlUrl()
        Description copied from class: GHObject
        Gets html url.
        Specified by:
        getHtmlUrl in class GHObject
        Returns:
        URL of this object for humans, which renders some HTML.
      • getCheckRunUrl

        public URL getCheckRunUrl()
        The check run URL.
        Returns:
        the check run url
      • getSteps

        public List<GHWorkflowJob.Step> getSteps()
        Gets the execution steps of this job.
        Returns:
        the execution steps
      • getRepository

        public GHRepository getRepository()
        Repository to which the job belongs.
        Returns:
        the repository
      • downloadLogs

        public <T> T downloadLogs​(InputStreamFunction<T> streamFunction)
                           throws IOException
        Downloads the logs.

        The logs are returned as a text file.

        Type Parameters:
        T - the type of result
        Parameters:
        streamFunction - The InputStreamFunction that will process the stream
        Returns:
        the result of reading the stream.
        Throws:
        IOException - The IO exception.