From 207ac6cc08c0acc2b350da90f6d483f9d804b79d Mon Sep 17 00:00:00 2001 From: KopekC Date: Thu, 13 Feb 2025 15:28:49 -0500 Subject: [PATCH 1/2] chore(core): adds github as a property for tob level access to repo operator --- src/codegen/sdk/core/codebase.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/codegen/sdk/core/codebase.py b/src/codegen/sdk/core/codebase.py index 7dd7f8d89..670cc8797 100644 --- a/src/codegen/sdk/core/codebase.py +++ b/src/codegen/sdk/core/codebase.py @@ -210,6 +210,20 @@ def __rich_repr__(self) -> rich.repr.Result: def op(self) -> RepoOperator: return self._op + @property + def github(self) -> RepoOperator: + """Access GitHub operations through the repo operator. + + This property provides access to GitHub operations like creating PRs, + working with branches, commenting on PRs, etc. The implementation is built + on top of PyGitHub (python-github library) and provides a simplified interface + for common GitHub operations. + + Returns: + RepoOperator: The repo operator instance that handles GitHub operations. + """ + return self._op + #################################################################################################################### # SIMPLE META #################################################################################################################### From eaa55c81aa8a5f59e4acb738dab85703b4d5a291 Mon Sep 17 00:00:00 2001 From: kopekC <28070492+kopekC@users.noreply.github.com> Date: Thu, 13 Feb 2025 20:30:28 +0000 Subject: [PATCH 2/2] Automated pre-commit update --- src/codegen/sdk/core/codebase.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/codegen/sdk/core/codebase.py b/src/codegen/sdk/core/codebase.py index 670cc8797..2cb1905d0 100644 --- a/src/codegen/sdk/core/codebase.py +++ b/src/codegen/sdk/core/codebase.py @@ -213,8 +213,8 @@ def op(self) -> RepoOperator: @property def github(self) -> RepoOperator: """Access GitHub operations through the repo operator. - - This property provides access to GitHub operations like creating PRs, + + This property provides access to GitHub operations like creating PRs, working with branches, commenting on PRs, etc. The implementation is built on top of PyGitHub (python-github library) and provides a simplified interface for common GitHub operations.