Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix private key #729

Merged
merged 1 commit into from
Mar 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion github_app_geo_project/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class GithubApplication(NamedTuple):
integration: github.GithubIntegration
name: str
"""The application name"""
private_key: str


class GithubProject(NamedTuple):
Expand Down Expand Up @@ -92,7 +93,12 @@ def get_github_application(config: dict[str, Any], application_name: str) -> Git
config[f"application.{application_name}.github_app_id"],
private_key,
)
objects = GithubApplication(auth, github.GithubIntegration(auth=auth, retry=3), application_name)
objects = GithubApplication(
auth,
github.GithubIntegration(auth=auth, retry=3),
application_name,
private_key,
)

GITHUB_APPLICATIONS[application_name] = objects

Expand Down
2 changes: 1 addition & 1 deletion github_app_geo_project/module/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ async def git_clone(github_project: configuration.GithubProject, branch: str) ->
if not directory.exists():
directory.mkdir(parents=True)
async with aiofiles.open(directory / "id_rsa", "w", encoding="utf-8") as file:
await file.write(github_project.application.auth.private_key) # type: ignore[attr-defined]
await file.write(github_project.application.private_key)

command = [
"git",
Expand Down
Loading