Skip to content

Commit cef3db3

Browse files
authored
chore: Remove access token from local repo operator (#354)
1 parent 1d77a05 commit cef3db3

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/codegen/git/repo_operator/remote_repo_operator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class RemoteRepoOperator(RepoOperator):
2626
# __init__ attributes
2727
repo_config: RepoConfig
2828
base_dir: str
29+
access_token: str | None = None
2930

3031
# lazy attributes
3132
_remote_git_repo: GitRepoClient | None = None
@@ -42,7 +43,8 @@ def __init__(
4243
bot_commit: bool = True,
4344
access_token: str | None = None,
4445
) -> None:
45-
super().__init__(repo_config=repo_config, base_dir=base_dir, bot_commit=bot_commit, access_token=access_token)
46+
super().__init__(repo_config=repo_config, base_dir=base_dir, bot_commit=bot_commit)
47+
self.access_token = access_token
4648
self.setup_repo_dir(setup_option=setup_option, shallow=shallow)
4749

4850
####################################################################################################################

src/codegen/git/repo_operator/repo_operator.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class RepoOperator(ABC):
2929
repo_config: BaseRepoConfig
3030
base_dir: str
3131
bot_commit: bool = True
32-
access_token: str | None = None
3332
_codeowners_parser: CodeOwnersParser | None = None
3433
_default_branch: str | None = None
3534

@@ -38,13 +37,11 @@ def __init__(
3837
repo_config: BaseRepoConfig,
3938
base_dir: str = "/tmp",
4039
bot_commit: bool = True,
41-
access_token: str | None = None,
4240
) -> None:
4341
assert repo_config is not None
4442
self.repo_config = repo_config
4543
self.base_dir = base_dir
4644
self.bot_commit = bot_commit
47-
self.access_token = access_token
4845

4946
####################################################################################################################
5047
# PROPERTIES

0 commit comments

Comments
 (0)