Compare commits

...

2 Commits

Author SHA1 Message Date
992f450004
feat: check current gitea user for joj3
All checks were successful
build / trigger-build-image (push) Successful in 24s
2025-09-21 04:56:14 -07:00
5478052c23
chore: updgrade to latest hooks 2025-09-21 04:53:13 -07:00
3 changed files with 17 additions and 8 deletions

View File

@ -1,41 +1,41 @@
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0 rev: v6.0.0
hooks: hooks:
- id: check-yaml - id: check-yaml
- id: end-of-file-fixer - id: end-of-file-fixer
- id: trailing-whitespace - id: trailing-whitespace
- id: requirements-txt-fixer - id: requirements-txt-fixer
- repo: https://github.com/pre-commit/mirrors-mypy - repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.4.1" rev: "v1.18.2"
hooks: hooks:
- id: mypy - id: mypy
additional_dependencies: additional_dependencies:
- pydantic - pydantic
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: v3.9.0 rev: v3.20.0
hooks: hooks:
- id: pyupgrade - id: pyupgrade
- repo: https://github.com/hadialqattan/pycln - repo: https://github.com/hadialqattan/pycln
rev: v2.4.0 rev: v2.5.0
hooks: hooks:
- id: pycln - id: pycln
args: [-a] args: [-a]
- repo: https://github.com/PyCQA/bandit - repo: https://github.com/PyCQA/bandit
rev: '1.7.5' rev: '1.8.6'
hooks: hooks:
- id: bandit - id: bandit
- repo: https://github.com/PyCQA/isort - repo: https://github.com/PyCQA/isort
rev: 5.12.0 rev: 6.0.1
hooks: hooks:
- id: isort - id: isort
args: ["--profile", "black", "--filter-files"] args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 23.7.0 rev: 25.9.0
hooks: hooks:
- id: black - id: black
- repo: https://github.com/Lucas-C/pre-commit-hooks - repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.1 rev: v1.5.5
hooks: hooks:
- id: remove-crlf - id: remove-crlf
- id: remove-tabs - id: remove-tabs

View File

@ -34,6 +34,11 @@ class Tea:
tea = Tea() # lazy loader 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") @app.command("export-users", help="export users from canvas to csv file")
def export_users_to_csv(output_file: Path = Argument("students.csv")) -> None: def export_users_to_csv(output_file: Path = Argument("students.csv")) -> None:
tea.pot.canvas.export_users_to_csv(output_file) tea.pot.canvas.export_users_to_csv(output_file)

View File

@ -110,6 +110,10 @@ class Gitea:
+ "but not found in Canvas students" + "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( def create_personal_repos_for_canvas_students(
self, self,
students: PaginatedList, students: PaginatedList,