feat: check current gitea user for joj3
All checks were successful
build / trigger-build-image (push) Successful in 24s

This commit is contained in:
张泊明518370910136 2025-09-21 04:56:14 -07:00
parent 5478052c23
commit 992f450004
GPG Key ID: CA088E6D9284F870
3 changed files with 10 additions and 1 deletions

View File

@ -17,7 +17,7 @@ repos:
hooks:
- id: pyupgrade
- repo: https://github.com/hadialqattan/pycln
rev: v2.4.0
rev: v2.5.0
hooks:
- id: pycln
args: [-a]

View File

@ -34,6 +34,11 @@ class Tea:
tea = Tea() # lazy loader
@app.command("get-gitea-user")
def get_gitea_user() -> None:
tea.pot.gitea.get_user()
@app.command("export-users", help="export users from canvas to csv file")
def export_users_to_csv(output_file: Path = Argument("students.csv")) -> None:
tea.pot.canvas.export_users_to_csv(output_file)

View File

@ -110,6 +110,10 @@ class Gitea:
+ "but not found in Canvas students"
)
def get_user(self) -> None:
user = self.user_api.user_get_current()
logger.info(f"Current user: {user}")
def create_personal_repos_for_canvas_students(
self,
students: PaginatedList,