Skip to content

Commit

Permalink
Refactor template automation models and add GitHub client implementation
Browse files Browse the repository at this point in the history
- Updated models in `models.py` to enhance documentation and structure.
- Introduced `TemplateConfig` class to encapsulate PR and workflow configurations.
- Modified `TemplateManager` in `template_manager.py` to utilize the new `TemplateConfig` model.
- Implemented `GitHubClient` class in `github_client.py` for comprehensive GitHub API interactions, including repository creation, file management, and workflow triggering.
- Improved error handling and logging throughout the GitHub client methods.
  • Loading branch information
Dave Arnold committed May 1, 2025
1 parent d4c2207 commit 02cd042
Show file tree
Hide file tree
Showing 8 changed files with 836 additions and 475 deletions.
1 change: 1 addition & 0 deletions docs/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ mkdir -p docs/source/_static
mkdir -p docs/build

# Generate documentation
export SPHINX_BUILD=1
cd docs
sphinx-build -b html source build

Expand Down
2 changes: 1 addition & 1 deletion docs/source/modules/github_client.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GitHub Client
=============

.. automodule:: template_automation.app
.. automodule:: template_automation.github_client
:members:
:undoc-members:
:show-inheritance:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/modules/lambda_handler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ Lambda Handler
=============

.. automodule:: template_automation.app
:members: lambda_handler, operate_github, generate_repository_name, get_parameter
:members: lambda_handler, get_github_token
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Core dependencies
PyGithub>=2.1.1
pydantic~=2.6
boto3>=1.38.6
requests>=2.32.3
jinja2>=3.1.0
typing_extensions>=4.4.0
pynacl>=1.5.0 # Required by PyGithub for cryptography
cryptography>=44.0.0 # Required by PyGithub for auth
pyjwt[crypto]>=2.10.0 # Required by PyGithub for JWT support
deprecated>=1.2.18 # Required by PyGithub for decorators
608 changes: 197 additions & 411 deletions template_automation/app.py

Large diffs are not rendered by default.

Loading

0 comments on commit 02cd042

Please sign in to comment.