pontos.github.actions package#

exception pontos.github.actions.GitHubActionsError#

A GitHub Actions related error has occurred

class pontos.github.actions.Console#

Class for printing messages to the action console

classmethod group(title)#

ContextManager to display a foldable group

Parameters:

title (str) – Title of the group

static start_group(title)#

Start a new folable group

Parameters:

title (str) – Title of the group

static end_group()#

End the last group

static warning(message, *, name=None, line=None, end_line=None, column=None, end_column=None, title=None)#

Print a warning message

This message will also be shown at the action summary

static error(message, *, name=None, line=None, end_line=None, column=None, end_column=None, title=None)#

Print an error message

This message will also be shown at the action summary

static notice(message, *, name=None, line=None, end_line=None, column=None, end_column=None, title=None)#

Print a warning message

This message will also be shown at the action summary

static log(message)#

Print a message to the console

static debug(message)#

Print a debug message to the console

These messages are only shown if the secret ACTIONS_STEP_DEBUG is set to true. See https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging

class pontos.github.actions.GitHubEnvironment#

Class to handle values from the GitHub Environment

https://docs.github.com/en/actions/learn-github-actions/environment-variables

class pontos.github.actions.GitHubEvent(event_path)#

GitHub Actions provides event data for the running action as JSON data in a local file at the runner.

The JSON data for the events is specified at https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads

pull_request#

Information about the pull request

Type:

pontos.github.actions.event.GitHubPullRequestEvent

Loads the event data from the passed path

Parameters:

event_path (Path) – Path to the event data

class pontos.github.actions.Label(name)#

A label of a pull request or issue

class pontos.github.actions.Ref(name, sha)#

A git branch reference

name#

Name of the git branch reference for example main

Type:

str

sha#

Git commit ID of the reference

Type:

str

class pontos.github.actions.PullRequestState(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#

State of a pull request

OPEN#

The pull request is open

CLOSED#

The pull request is closed

class pontos.github.actions.GitHubPullRequestEvent(pull_request_data)#

Event data of a GitHub Pull Request

https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request

draft#

True if the pull request is a draft

Type:

Optional[bool]

number#

ID of the pull request

Type:

Optional[int]

labels#

Labels attached to the pull request

Type:

Optional[Iterable[str]]

title#

Title of the pull request

Type:

Optional[str]

merged#

True if the pull request is already merged

Type:

Optional[bool]

state#

State of the pull request (open, closed)

Type:

pontos.github.actions.event.PullRequestState

base#

Base reference of the pull request (target branch)

Type:

pontos.github.actions.event.Ref

head#

Head reference of the pull request (source branch)

Type:

pontos.github.actions.event.Ref

Derive the pull request information from the pull request data of a GitHub event.

Parameters:

pull_request_data (Dict[str, Any]) – JSON based pull request information as dict