Class GHWorkflowRun

    • Constructor Detail

      • GHWorkflowRun

        public GHWorkflowRun()
    • Method Detail

      • getName

        public String getName()
        The name of the workflow run.
        Returns:
        the name
      • getRunNumber

        public long getRunNumber()
        The run number.
        Returns:
        the run number
      • getWorkflowId

        public long getWorkflowId()
        The workflow id.
        Returns:
        the workflow id
      • getJobsUrl

        public URL getJobsUrl()
        The jobs URL, like https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/jobs
        Returns:
        the diff url
      • getLogsUrl

        public URL getLogsUrl()
        The logs URL, like https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/logs
        Returns:
        the diff url
      • getCheckSuiteUrl

        public URL getCheckSuiteUrl()
        The check suite URL, like https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374
        Returns:
        the diff url
      • getArtifactsUrl

        public URL getArtifactsUrl()
        The artifacts URL, like https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/artifacts
        Returns:
        the diff url
      • getCancelUrl

        public URL getCancelUrl()
        The cancel URL, like https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/cancel
        Returns:
        the diff url
      • getRerunUrl

        public URL getRerunUrl()
        The rerun URL, like https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/rerun
        Returns:
        the diff url
      • getWorkflowUrl

        public URL getWorkflowUrl()
        The workflow URL, like https://api.github.com/repos/octo-org/octo-repo/actions/workflows/159038
        Returns:
        the diff url
      • getHeadBranch

        public String getHeadBranch()
        The head branch name the changes are on.
        Returns:
        head branch name
      • getHeadSha

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

        public GHRepository getHeadRepository()
        The repository of current head.
        Returns:
        head repository
      • getEvent

        public GHEvent getEvent()
        The type of event that triggered the build.
        Returns:
        type of event
      • getStatus

        public GHWorkflowRun.Status getStatus()
        Gets status of the workflow run.

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

        Returns:
        status of the workflow run
      • getConclusion

        public GHWorkflowRun.Conclusion getConclusion()
        Gets the conclusion of the workflow run.

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

        Returns:
        conclusion of the workflow run
      • getPullRequests

        public List<GHPullRequest> getPullRequests()
                                            throws IOException
        Gets the pull requests participated in this workflow run. Note this field is only populated for events. When getting a GHWorkflowRun outside of an event, this is always empty.
        Returns:
        the list of GHPullRequests for this workflow run. Only populated for events.
        Throws:
        IOException - the io exception
      • cancel

        public void cancel()
                    throws IOException
        Cancel the workflow run.
        Throws:
        IOException - the io exception
      • delete

        public void delete()
                    throws IOException
        Delete the workflow run.
        Throws:
        IOException - the io exception
      • rerun

        public void rerun()
                   throws IOException
        Rerun the workflow run.
        Throws:
        IOException - the io exception