Skip to content

jobs

Accessed as client.repos.actions.jobs; the async client mirrors it.

ReposActionsJobs

The repos.actions.jobs namespace.

logs

logs(owner: str, repo: str, job_id: int, *, attempt: int | None = None) -> str

Download the plaintext logs of an action job.

Returns the plaintext log for the job. By default the log for the most recent attempt is returned (ActionRunJob.TaskID tracks the latest task). Pass ?attempt=N to fetch the log for a specific historical attempt; the value matches the attempt field returned by the job listing endpoints.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
job_id int

ID of the workflow job

required
attempt int | None

1-based attempt number matching the value of attempt in the job listing; omit to fetch the latest attempt of the job

None

Returns:

Type Description
str

Plaintext log content.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: repoGetActionJobLogs

AsyncReposActionsJobs

The repos.actions.jobs namespace.

logs

logs(owner: str, repo: str, job_id: int, *, attempt: int | None = None) -> str

Download the plaintext logs of an action job.

Returns the plaintext log for the job. By default the log for the most recent attempt is returned (ActionRunJob.TaskID tracks the latest task). Pass ?attempt=N to fetch the log for a specific historical attempt; the value matches the attempt field returned by the job listing endpoints.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
job_id int

ID of the workflow job

required
attempt int | None

1-based attempt number matching the value of attempt in the job listing; omit to fetch the latest attempt of the job

None

Returns:

Type Description
str

Plaintext log content.

Raises:

Type Description
UnauthorizedError
  1. APIUnauthorizedError is a unauthorized error response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: repoGetActionJobLogs