Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased¶
v0.9.0 - 2026-03-09¶
Added¶
Repoconstructor now supports explicit clone branch/ref/auth and checkout controls:clone_branch,clone_ref,github_token, andclone_no_checkout.Added built-in retry and exponential backoff controls for clone/fetch/pull workflows via
retry_attempts,retry_backoff_seconds, andretry_backoff_multiplier.Added operation observability metadata for retried operations with
Repo.get_operation_metadata()includingattempts,retries,elapsed_ms, andsuccess.Added typed git operation exceptions for cleaner error handling:
GitCloneErrorGitAuthenticationErrorGitNetworkErrorGitReferenceError
Changed¶
Improved private repository clone UX by allowing token-based HTTPS auth in
Repo(...)without pre-embedding credentials in the URL.Standardized sensitive value redaction for git error messages, with support for an optional custom redaction callback.
Fixed¶
Fixed Job Summary Templates documentation to correctly document the
JobSummaryTemplateclass static methods instead of unrelated custom examples.
v0.8.0 - 2025-10-19¶
Added¶
Documentation Improvements
Added comprehensive Quickstart Guide for getting started in minutes
Added Comparison Guide with Javascript @actions/toolkit with function mapping and examples
Added Recipes documentation with common patterns for inputs, outputs, grouping, annotations, and more
Added Security Best Practices guide covering input validation, secrets management, and secure coding
Added Examples documentation with complete workflow examples (greeter, linter, test reporter, deployment, etc.)
Enhanced README with comparison to Javascript toolkit, installation instructions, and code examples
Updated documentation index with better organization and navigation
Added practical example scripts:
test_reporter_action.pyanddocker_build_action.py
Code Documentation
Added module-level docstrings to
consts.pyexplaining constants usageAdded module-level docstrings to
version.pyexplaining version managementAdded module-level docstrings to
event_models.pyexplaining Pydantic models
Local Development Simulator
Local development simulator for testing GitHub Actions locally without pushing to GitHub
simulate_github_action()context manager for full environment simulationSimulatorResultfor accessing outputs, summaries, state, and environment variables
Added custom exception taxonomy for better error handling:
GitHubActionError- Base exception for all toolkit errorsEnvironmentVariableError- For missing/invalid environment variablesInputError- For invalid user inputGitOperationError- For git operation failuresGitHubAPIError- For GitHub API failuresConfigurationError- For invalid configurationCacheNotFoundError,CacheRestoreError,CacheSaveError- For cache operationsAPIError,RateLimitError- For GitHub API errorsCancellationRequested- For cancellation signals
Added scoped environment helpers:
with_env()- Context manager for temporary environment variables
Added new class-based APIs:
EventPayload- Class for accessing GitHub Actions event dataDebugging- Class with static methods for debugging utilitiesCancellationHandler- Class for managing cancellation signals
Added
GitRepoas an alias forRepoclass
Changed¶
Improved error messages with actionable context across all functions
Enhanced docstrings with detailed parameter descriptions and exception information
Functions now raise specific exception types instead of generic ValueError/RuntimeError:
set_output(),save_state(),set_env(),get_workflow_environment_variables()raiseEnvironmentVariableErrorget_user_input_as()raisesInputErrorRepo.__init__()raisesConfigurationErrororGitOperationErrorRepo.create_pr()raisesConfigurationError,GitOperationError, orGitHubAPIErrorGitHubArtifacts.__init__()raisesConfigurationError,EnvironmentVariableError, orGitHubAPIError
BREAKING: Removed backward compatibility function exports from main package
Event payload functions (
event_payload(),get_event_name(), etc.) removed - useEventPayloadclass insteadDebugging function (
print_directory_tree()) removed - useDebugging.print_directory_tree()insteadSignal handling functions (
enable_cancellation_support(), etc.) removed - useCancellationHandlerclass instead
BREAKING: Event models no longer exported from main package
Import from
github_action_toolkit.event_modelsinstead
BREAKING: Exceptions no longer exported from main package
Import from
github_action_toolkit.exceptionsinstead
Simplified package exports to focus on class-based APIs
Migration Guide¶
Before:
from github_action_toolkit import event_payload, get_event_name, is_pr
from github_action_toolkit import print_directory_tree
from github_action_toolkit import enable_cancellation_support
from github_action_toolkit import PushEvent, CancellationRequested
payload = event_payload()
name = get_event_name()
print_directory_tree()
enable_cancellation_support()
After:
from github_action_toolkit import EventPayload, Debugging, CancellationHandler
from github_action_toolkit.event_models import PushEvent
from github_action_toolkit.exceptions import CancellationRequested
event = EventPayload()
payload = event.get_payload()
name = event.get_event_name()
Debugging.print_directory_tree()
handler = CancellationHandler()
handler.enable()
is_cancellation_enabled()- Check if cancellation is enabled
v0.7.0 - 2025-10-19¶
Added¶
Advanced Git Manager features for
Repoclass:Safe directory configuration with
configure_safe_directory()Shallow clone support with
depthandsingle_branchparameters in constructorSparse checkout functionality with
sparse_checkout_init(),sparse_checkout_set(), andsparse_checkout_add()Submodule management with
submodule_init()andsubmodule_update()GPG signing configuration with
configure_gpg_signing()SSH signing configuration with
configure_ssh_signing()Authenticated remote setup with
set_remote_url()with token supportTagging operations:
create_tag(),list_tags(),push_tag(),push_all_tags(),delete_tag(), andget_latest_tag()Changelog extraction with
extract_changelog_section()Release preparation helper with
prepare_release()Comprehensive documentation for all new features in
docs/source/usage/git_manager.md
Added
GitHubAPIClient- A typed GitHub API client with advanced features:Automatic rate limit detection and handling with exponential backoff
Support for GitHub Enterprise Server (GHES) via custom base URL
Pagination helpers for easy iteration over large result sets
Conditional request support with ETag caching
GraphQL query execution
Built-in retry logic with configurable backoff
Comprehensive error handling with
RateLimitErrorandAPIErrorexceptions
Added
GitHubCacheclass for Actions cache support with following functionality:save_cache: Save cache with composite keys
restore_cache: Restore cache with fallback key hierarchy
is_feature_available: Check if cache feature is available
Added cache-related exceptions: CacheNotFoundError, CacheRestoreError, CacheSaveError
Major changes and addition in
GitHubArtifactsclassGitHubArtifacts.upload_artifact(): New method to upload files as artifacts with pattern glob support, compression, and integrity checksPattern glob support for artifact file selection (e.g.,
*.log,build/**/*.js)SHA-256 checksum calculation and verification for artifact integrity checks
Retry logic with exponential backoff for all artifact operations (upload, download, delete)
Retention days configuration support for uploaded artifacts
name_patternparameter toget_artifacts()for filtering artifacts by name patternGitHubArtifacts.download_artifact(): Addedverify_checksum,expected_checksum, andmax_retriesparametersGitHubArtifacts.delete_artifact(): Addedmax_retriesparameter and improved error handlingGitHubArtifacts.get_artifacts(): Addedname_patternparameter for pattern-based filteringImproved error handling for large files and edge cases with detailed error messages
All HTTP operations now include timeout and retry logic for robustness
Fluent Job Summary Builder API (
JobSummaryclass) for constructing rich GitHub Actions job summariesSupport for headings, text, line breaks, and separators
Support for ordered and unordered lists
Support for tables with headers, rows, and advanced cell options (colspan, rowspan)
Support for code blocks with optional syntax highlighting
Support for images with alt text and dimensions
Support for collapsible details sections
Support for quotes and links
Automatic content sanitization to prevent XSS attacks
Size limit enforcement (1 MiB maximum)
Buffer management with
write(),clear(),is_empty(), andstringify()methods
Job Summary Template API (
JobSummaryTemplateclass) with pre-built templates for:Test reports with pass/fail/skip counts
Code coverage reports with per-module breakdowns
Deployment reports with environment and version details
Benchmark reports with performance metrics
Comprehensive documentation for Job Summary API with examples
Added
export_variablefunction as an alias forset_envto match Javascript @actions/core naming conventionAdded
add_pathfunction to prepend directories to the system PATH for subsequent workflow stepsAdded new functions related to
event_payloadEnhanced all environment file operations (
GITHUB_OUTPUT,GITHUB_ENV,GITHUB_STATE,GITHUB_PATH) with thread-safe atomic writesImproved security with delimiter injection prevention and enhanced input validation
All file operations now use
fsync()for atomic writes ensuring data durabilityAdded strongly typed event models using Pydantic for common GitHub Actions events:
PushEventfor push eventsPullRequestEventfor pull_request eventsIssueCommentEventfor issue_comment eventsWorkflowRunEventfor workflow_run events
Added supporting typed models:
Actor,Repository,Commit,Label,PullRequest,Issue,Comment,WorkflowRun,BaseEventAdded
get_typed_event()function to parse event payload into typed modelsAdded convenience helper functions:
get_event_name()- get the name of the triggering eventis_pr()- check if current event is a pull requestget_pr_number()- get PR number for pull request eventshead_ref()- get head reference for push/PR eventsbase_ref()- get base reference for PR eventsget_changed_files()- get list of changed files for push eventsget_labels()- get list of labels for PR/issue events
Changed¶
Many improvements in code and documentation.
v0.6.0 - 2025-10-15¶
Added¶
Added a new debugging function
print_directory_tree
Changed¶
Repoclass: Introduced shared cleanup helper to synchronize to base branch. Cleanup job runs on both context enter and exit (fetch, checkout, hard reset, clean, pull). To use it you can use the new parameter added to Repo constructorcleanup.
v0.5.1 - 2025-10-13¶
Fixed¶
get_user_input_as function’s default value recognition when not defined in the environment variable issue is fixed.
devtools reorganized.
v0.5.0 - 2025-10-11¶
Added¶
Added GitHubArtifacts class with following functions
get_artifacts
get_artifact
download_artifact
delete_artifact
Improvement¶
Code cleanup.
v0.4.0 - 2025-10-10¶
Code Improvement¶
Linting issues fixed.
Code annotation updated.
Improvements for Better Python Package Management¶
Added Agent instruction for Code Editors and AI tools.
Developer Docs improved.
Contributor notes improved.
Document Contributor notes improved.
Release publication document added.
GitHub Workflow - Build and Test updated.
New Github Workflow for publishing Release and Docs added.
Make file improved.
Adding linting checks and other code checking file.
pyproject.tomlfile improved.
v0.3.0 - 2025-09-20¶
Added¶
New class
Repoadded with relevant functions.get_current_branch
create_new_branch
add
commit
add_all_and_commit
push
pull
create_pr
v0.2.0 - 2025-09-20¶
Added¶
Following new print messages related functions have been added.
info
Following new user input related function has been added.
get_all_user_inputs
print_all_user_inputs
get_user_input_as
v0.1.0 - 2025-09-20¶
Added¶
Following print messages related functions have been added.
echo
debug
notice
warning
error
add_mask
start_group
end_group
group
Following job summary related functions have been added.
append_job_summary
overwrite_job_summary
remove_job_summary
Following input, output, environment variable and state related functions have been added.
get_state
save_state
get_user_input
set_output
get_workflow_environment_variables
get_env
set_env
Following event_payload related function has been added.
event_payload