Skip to content
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
5 changes: 5 additions & 0 deletions github_tests_validator_app/bin/github_repo_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ def validate_github_repo(
student_github_connector: GitHubConnector, gsheet: GSheetConnector, payload: Dict[str, Any]
) -> None:

logging.info(f"Connecting to repo : {GH_TESTS_REPO_NAME}")

tests_github_connector = GitHubConnector(
user=student_github_connector.user,
repo_name=GH_TESTS_REPO_NAME
Expand All @@ -99,6 +101,9 @@ def validate_github_repo(
branch_name="main",
access_token=GH_PAT,
)

logging.info(f"Connecting to repo : {student_github_connector.repo.parent.full_name}")

original_github_connector = GitHubConnector(
user=student_github_connector.user,
repo_name=student_github_connector.repo.parent.full_name,
Expand Down
4 changes: 2 additions & 2 deletions github_tests_validator_app/lib/connectors/github_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(
self.set_git_integration()
self.set_access_token(repo_name)
self.connector = Github(login_or_token=self.ACCESS_TOKEN, timeout=30)
self.repo = self.connector.get_repo(f"{self.user.LOGIN}/{repo_name}")
self.repo = self.connector.get_repo(f"{repo_name}")
logging.info("Done.")

def set_git_integration(self) -> None:
Expand All @@ -52,7 +52,7 @@ def set_access_token(self, repo_name: str) -> None:
def get_repo(self, repo_name: str) -> Repository.Repository:
self.REPO_NAME = repo_name
logging.info(f"Connecting to new repo: {repo_name} with user: {self.user.LOGIN} ...")
self.repo = self.connector.get_repo(f"{self.user.LOGIN}/{repo_name}")
self.repo = self.connector.get_repo(f"{repo_name}")
logging.info("Done.")
return self.repo

Expand Down
2 changes: 2 additions & 0 deletions github_tests_validator_app/lib/connectors/google_drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ def callback(request_id, response, exception):
else:
ids.append(response.get("id"))

logging.info(f"Sharing file {real_file_id} to : {user_email}")

batch = self.client.new_batch_http_request(callback=callback)
user_permission = {"type": "user", "role": "writer", "emailAddress": user_email}
batch.add(
Expand Down