gitingest/tests
Filip Christiansen f8d397e66e
Some checks failed
CI / test (macos-latest, 3.10) (push) Has been cancelled
CI / test (macos-latest, 3.11) (push) Has been cancelled
CI / test (macos-latest, 3.12) (push) Has been cancelled
CI / test (macos-latest, 3.13) (push) Has been cancelled
CI / test (macos-latest, 3.8) (push) Has been cancelled
CI / test (macos-latest, 3.9) (push) Has been cancelled
CI / test (ubuntu-latest, 3.10) (push) Has been cancelled
CI / test (ubuntu-latest, 3.11) (push) Has been cancelled
CI / test (ubuntu-latest, 3.12) (push) Has been cancelled
CI / test (ubuntu-latest, 3.13) (push) Has been cancelled
CI / test (ubuntu-latest, 3.8) (push) Has been cancelled
CI / test (ubuntu-latest, 3.9) (push) Has been cancelled
CI / test (windows-latest, 3.10) (push) Has been cancelled
CI / test (windows-latest, 3.11) (push) Has been cancelled
CI / test (windows-latest, 3.12) (push) Has been cancelled
CI / test (windows-latest, 3.13) (push) Has been cancelled
CI / test (windows-latest, 3.8) (push) Has been cancelled
CI / test (windows-latest, 3.9) (push) Has been cancelled
OSSF Scorecard / Scorecard analysis (push) Has been cancelled
refactor: centralize PAT validation, streamline repo checks & misc cleanup (#349)
* refactor: centralize PAT validation, streamline repo checks & housekeeping

* `.venv*` to `.gitignore`
* `# type: ignore[attr-defined]` hints in `compat_typing.py` for IDE-agnostic imports
* Helpful PAT string in `InvalidGitHubTokenError` for easier debugging

* Bump **ruff-pre-commit** hook → `v0.12.1`
* CONTRIBUTING:
  * Require **Python 3.9+**
  * Recommend signed (`-S`) commits
* PAT validation now happens **only** in entry points
  (`utils.auth.resolve_token` for CLI/lib, `server.process_query` for Web UI)
* Unified `_check_github_repo_exists` into `check_repo_exists`, replacing
  `curl -I` with `curl --silent --location --write-out %{http_code} -o /dev/null`
* Broaden `_GITHUB_PAT_PATTERN`
* `create_git_auth_header` raises `ValueError` when hostname is missing
* Tests updated to expect raw HTTP-code output

* Superfluous “token can be set via `GITHUB_TOKEN`” notes in docstrings
* `.gitingestignore` & `.terraform` from `DEFAULT_IGNORE_PATTERNS`
* Token validation inside `create_git_command`
* Obsolete `test_create_git_command_invalid_token`

* Adjust `test_clone.py` and `test_git_utils.py` for new status-code handling
* Consolidate mocks after token-validation relocation

BREAKING CHANGE:
`create_git_command` no longer validates GitHub tokens; callers must ensure
tokens are valid (via `validate_github_token`) before invoking lower-level
git helpers.


---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-01 14:21:13 +02:00
..
query_parser chore: switch to ruff + pydoclint, deprecate .gitingest, and perform a repo-wide quality sweep (#329) 2025-06-28 18:49:37 +02:00
.pylintrc Refactor project structure, enhance logic, update configurations, and improve code quality (#85) 2025-01-03 08:33:28 +01:00
__init__.py chore: switch to ruff + pydoclint, deprecate .gitingest, and perform a repo-wide quality sweep (#329) 2025-06-28 18:49:37 +02:00
conftest.py chore: switch to ruff + pydoclint, deprecate .gitingest, and perform a repo-wide quality sweep (#329) 2025-06-28 18:49:37 +02:00
test_cli.py chore: switch to ruff + pydoclint, deprecate .gitingest, and perform a repo-wide quality sweep (#329) 2025-06-28 18:49:37 +02:00
test_clone.py refactor: centralize PAT validation, streamline repo checks & misc cleanup (#349) 2025-07-01 14:21:13 +02:00
test_flow_integration.py chore: switch to ruff + pydoclint, deprecate .gitingest, and perform a repo-wide quality sweep (#329) 2025-06-28 18:49:37 +02:00
test_git_utils.py refactor: centralize PAT validation, streamline repo checks & misc cleanup (#349) 2025-07-01 14:21:13 +02:00
test_gitignore_feature.py chore: switch to ruff + pydoclint, deprecate .gitingest, and perform a repo-wide quality sweep (#329) 2025-06-28 18:49:37 +02:00
test_ingestion.py chore: switch to ruff + pydoclint, deprecate .gitingest, and perform a repo-wide quality sweep (#329) 2025-06-28 18:49:37 +02:00
test_notebook_utils.py chore: switch to ruff + pydoclint, deprecate .gitingest, and perform a repo-wide quality sweep (#329) 2025-06-28 18:49:37 +02:00