pontos.github.actions package¶
- exception pontos.github.actions.GitHubActionsError¶
A GitHub Actions related error has occurred
- class pontos.github.actions.ActionIO¶
Class with static methods for handling GitHub Action IO
- static out()¶
Create an action output to write several output values
An action output can be consumed by another job
Example
from pontos.github.actions import ActionIO with ActionIO.out() as out: out.write("foo", "bar") out.write("lorem", "ipsum")
- Return type:
Generator[ActionOutput, None, None]
- static output(name, value)¶
Set action output
An action output can be consumed by another job
Example
from pontos.github.actions import ActionIO ActionIO.output("foo", "bar")
- Parameters:
name (str) – Name of the output variable
value (SupportsStr) – Value of the output variable
- static multiline_output(name, value)¶
Set an multiline action output
An action output can be consumed by another job
Example
from pontos.github.actions import ActionIO ActionIO.output("foo", "bar")
- Parameters:
name (str) – Name of the output variable
value (SupportsStr) – Value of the output variable
- static input(name, default=None)¶
Get the value of an action input
Example
from pontos.github.actions import ActionIO value = ActionIO.input("foo", "bar")
- class pontos.github.actions.ActionOutput(file)¶
A GitHub Action output
- class pontos.github.actions.Console¶
Class for printing messages to the action console
- classmethod group(title)¶
ContextManager to display a foldable group
from pontos.github.actions import Console console = Console() with console.group("my-group"): console.log("some message")
- 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
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
- class pontos.github.actions.PullRequestState(value)¶
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
- state¶
State of the pull request (open, closed)
- base¶
Base reference of the pull request (target branch)
- head¶
Head reference of the pull request (source branch)
Derive the pull request information from the pull request data of a GitHub event.