python-gitea 0.11.6__tar.gz → 0.12.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.github/workflows/codeql.yml +3 -3
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.github/workflows/draft_release.yml +1 -1
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.github/workflows/release.yml +1 -1
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.github/workflows/scheduled_release.yml +1 -1
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.github/workflows/support_floor_update.yml +1 -1
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.pre-commit-config.yaml +4 -4
- {python_gitea-0.11.6 → python_gitea-0.12.0}/PKG-INFO +1 -1
- {python_gitea-0.11.6 → python_gitea-0.12.0}/docs/dev/architecture.md +3 -2
- {python_gitea-0.11.6 → python_gitea-0.12.0}/docs/user-guide/cli.md +40 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/docs/user-guide/python-api.md +2 -2
- {python_gitea-0.11.6 → python_gitea-0.12.0}/pyproject.toml +2 -2
- python_gitea-0.12.0/src/gitea/cli/issue/label/__init__.py +1 -0
- python_gitea-0.12.0/src/gitea/cli/issue/label/add.py +97 -0
- python_gitea-0.12.0/src/gitea/cli/issue/label/clear.py +94 -0
- python_gitea-0.12.0/src/gitea/cli/issue/label/common.py +217 -0
- python_gitea-0.12.0/src/gitea/cli/issue/label/list.py +87 -0
- python_gitea-0.12.0/src/gitea/cli/issue/label/main.py +29 -0
- python_gitea-0.12.0/src/gitea/cli/issue/label/remove.py +99 -0
- python_gitea-0.12.0/src/gitea/cli/issue/label/set.py +98 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/issue/main.py +2 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/issue/async_issue.py +248 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/issue/base.py +57 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/issue/issue.py +242 -0
- python_gitea-0.12.0/tests/cli/issue/label/__init__.py +1 -0
- python_gitea-0.12.0/tests/cli/issue/label/test_cli_issue_label.py +417 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/test_cli_contract.py +12 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/test_cli_main.py +11 -0
- python_gitea-0.12.0/tests/issue/test_issue_labels.py +118 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/uv.lock +304 -304
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.coderabbit.yaml +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.github/ISSUE_TEMPLATE/bug-report.md +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.github/ISSUE_TEMPLATE/feature-request.md +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.github/pull_request_template.md +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.github/workflows/ci.yml +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.github/workflows/documentation.yml +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.github/workflows/publish.yml +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.github/workflows/publish_testpypi.yml +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.github/workflows/semantic_pull_request.yml +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.gitignore +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.markdownlint.yaml +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.prettierrc +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.pypirc +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/.typos.toml +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/CITATION.cff +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/CODE_OF_CONDUCT.md +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/CONTRIBUTING.md +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/LICENSE +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/README.md +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/SECURITY.md +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/SUPPORT.md +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/cliff.toml +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/docs/contributing.md +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/docs/dev/troubleshooting.md +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/docs/gen_ref_pages.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/docs/index.md +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/docs/javascripts/mathjax.js +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/docs/security.md +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/docs/style/api.css +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/docs/user-guide/configuration.md +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/docs/user-guide/installation.md +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/docs/user-guide/quickstart.md +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/mkdocs.yml +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/renovate.json +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/scripts/release_version.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/__main__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/_lazy.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/actions/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/actions/actions.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/actions/artifact.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/actions/async_actions.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/actions/async_artifact.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/actions/async_run_management.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/actions/async_runner.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/actions/async_secret.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/actions/async_variable.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/actions/base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/actions/run_management.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/actions/runner.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/actions/scope.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/actions/secret.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/actions/variable.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/artifact/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/artifact/delete.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/artifact/download.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/artifact/get.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/artifact/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/job/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/job/get.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/job/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/job/logs.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/job/rerun.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/run/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/run/approve.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/run/cancel.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/run/delete.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/run/force_cancel.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/run/get.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/run/jobs.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/run/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/run/rerun.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/runner/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/runner/delete.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/runner/get.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/runner/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/runner/registration_token.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/runner/state.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/runner/update.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/secret/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/secret/delete.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/secret/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/secret/set.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/variable/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/variable/create.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/variable/delete.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/variable/get.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/variable/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/variable/update.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/workflow/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/workflow/dispatch.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/workflow/get.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/actions/workflow/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/comment/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/comment/add.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/comment/delete.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/comment/edit.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/comment/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/comment/main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/config/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/config/add.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/config/delete.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/config/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/config/main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/config/update.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/issue/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/issue/close.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/issue/create.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/issue/dependency/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/issue/dependency/add.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/issue/dependency/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/issue/dependency/main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/issue/dependency/remove.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/issue/edit.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/issue/get.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/issue/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/label/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/label/create.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/label/delete.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/label/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/label/main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/label/update.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/milestone/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/milestone/create.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/milestone/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/milestone/main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/notification/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/notification/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/notification/main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/notification/read.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/organization/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/organization/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/organization/main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/output.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/column/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/column/create.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/column/issues.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/column/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/create.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/delete.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/edit.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/get.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/issue/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/issue/add.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/issue/move.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/issue/remove.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/issues.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/project/show.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/pull_request/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/pull_request/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/pull_request/main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/repository/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/repository/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/repository/main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/user/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/user/get.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/user/main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/user/update_settings.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/utils/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/utils/api.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/utils/auth.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/utils/convert.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/utils/errors.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/utils/issue.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/utils/options.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/watch/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/watch/advance.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/watch/list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/watch/main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/cli/watch/scopes.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/client/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/client/async_gitea.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/client/base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/client/gitea.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/comment/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/comment/async_comment.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/comment/base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/comment/comment.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/config/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/config/manager.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/config/model.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/issue/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/issue/project_column.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/label/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/label/async_label.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/label/base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/label/label.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/milestone/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/milestone/async_milestone.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/milestone/base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/milestone/milestone.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/notification/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/notification/async_notification.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/notification/base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/notification/notification.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/organization/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/organization/async_organization.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/organization/base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/organization/organization.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/project/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/project/async_project.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/project/base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/project/project.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/pull_request/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/pull_request/async_pull_request.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/pull_request/base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/pull_request/pull_request.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/repository/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/repository/async_repository.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/repository/base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/repository/repository.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/resource/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/resource/async_resource.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/resource/protocol.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/resource/resource.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/user/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/user/async_user.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/user/base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/user/user.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/utils/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/utils/fields.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/utils/log.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/utils/pagination.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/utils/response.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/version.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/watch/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/watch/changes.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/src/gitea/watch/state.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/actions/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/actions/test_actions_base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/actions/test_actions_imports.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/actions/test_actions_requests.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/actions/test_actions_scope.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/board.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/invoking.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/test_cli_actions_artifact.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/test_cli_actions_job_get.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/test_cli_actions_job_list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/test_cli_actions_job_logs.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/test_cli_actions_main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/test_cli_actions_run_get.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/test_cli_actions_run_jobs.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/test_cli_actions_run_list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/test_cli_actions_run_management.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/test_cli_actions_runner.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/test_cli_actions_secret.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/test_cli_actions_variable.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/test_cli_actions_workflow_dispatch.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/test_cli_actions_workflow_get.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/actions/test_cli_actions_workflow_list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/comment/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/comment/test_cli_comment_add.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/comment/test_cli_comment_delete.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/comment/test_cli_comment_edit.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/comment/test_cli_comment_list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/comment/test_cli_comment_main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/config/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/config/test_cli_config_add.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/config/test_cli_config_delete.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/config/test_cli_config_list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/config/test_cli_config_main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/config/test_cli_config_update.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/envelope.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/issue/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/issue/dependency/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/issue/dependency/test_cli_issue_dependency.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/issue/test_cli_issue_close.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/issue/test_cli_issue_comment.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/issue/test_cli_issue_create.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/issue/test_cli_issue_edit.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/issue/test_cli_issue_get.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/issue/test_cli_issue_list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/issue/test_cli_issue_main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/label/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/label/test_cli_label_create.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/label/test_cli_label_delete.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/label/test_cli_label_list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/label/test_cli_label_main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/label/test_cli_label_update.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/milestone/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/milestone/test_cli_milestone_create.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/milestone/test_cli_milestone_list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/milestone/test_cli_milestone_main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/notification/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/notification/test_cli_notification.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/organization/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/organization/test_cli_organization_list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/organization/test_cli_organization_main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/project/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/project/test_cli_project.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/project/test_cli_project_column_issues.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/project/test_cli_project_show.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/pull_request/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/pull_request/test_cli_pull_request_list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/pull_request/test_cli_pull_request_main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/rendering.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/repository/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/repository/test_cli_repository_list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/repository/test_cli_repository_main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/test_cli_output.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/tree.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/user/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/user/test_cli_user_get.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/user/test_cli_user_update_settings.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/utils/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/utils/test_cli_utils_api.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/utils/test_cli_utils_auth.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/utils/test_cli_utils_convert.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/utils/test_cli_utils_errors.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/utils/test_cli_utils_issue.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/utils/test_cli_utils_options.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/watch/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/watch/support.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/watch/test_cli_watch_advance.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/watch/test_cli_watch_list.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/cli/watch/test_cli_watch_scopes.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/client/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/client/test_client_async_gitea.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/client/test_client_base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/client/test_client_gitea.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/comment/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/comment/test_comment_async_comment.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/comment/test_comment_base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/comment/test_comment_comment.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/config/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/config/test_config_manager.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/config/test_config_model.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/conftest.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/issue/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/issue/test_issue_async_issue.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/issue/test_issue_async_project_column.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/issue/test_issue_base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/issue/test_issue_dependencies.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/issue/test_issue_issue.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/issue/test_issue_project_column.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/label/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/label/test_label_async_label.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/label/test_label_base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/label/test_label_label.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/milestone/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/milestone/test_milestone_async_milestone.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/milestone/test_milestone_base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/milestone/test_milestone_milestone.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/notification/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/notification/test_notification_base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/notification/test_notification_notification.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/organization/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/organization/test_organization_async_organization.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/organization/test_organization_base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/organization/test_organization_organization.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/project/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/project/test_project_base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/project/test_project_project.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/project/test_project_requests.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/pull_request/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/pull_request/test_pull_request_async_pull_request.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/pull_request/test_pull_request_base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/pull_request/test_pull_request_pull_request.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/repository/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/repository/test_repository_async_repository.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/repository/test_repository_base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/repository/test_repository_repository.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/resource/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/resource/test_resource_async_resource.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/resource/test_resource_resource.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/smoke_test.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/test_import.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/test_lazy_reexports.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/test_main.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/test_release_version.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/test_version.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/transport.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/user/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/user/test_user_async_user.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/user/test_user_base.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/user/test_user_user.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/utils/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/utils/test_utils_fields.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/utils/test_utils_log.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/utils/test_utils_pagination.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/utils/test_utils_response.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/watch/__init__.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/watch/test_watch_changes.py +0 -0
- {python_gitea-0.11.6 → python_gitea-0.12.0}/tests/watch/test_watch_state.py +0 -0
|
@@ -22,13 +22,13 @@ jobs:
|
|
|
22
22
|
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
|
|
23
23
|
|
|
24
24
|
- name: Initialize CodeQL
|
|
25
|
-
uses: github/codeql-action/init@
|
|
25
|
+
uses: github/codeql-action/init@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4
|
|
26
26
|
with:
|
|
27
27
|
languages: python
|
|
28
28
|
queries: security-and-quality
|
|
29
29
|
|
|
30
30
|
- name: Autobuild
|
|
31
|
-
uses: github/codeql-action/autobuild@
|
|
31
|
+
uses: github/codeql-action/autobuild@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4
|
|
32
32
|
|
|
33
33
|
- name: Perform CodeQL Analysis
|
|
34
|
-
uses: github/codeql-action/analyze@
|
|
34
|
+
uses: github/codeql-action/analyze@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4
|
|
@@ -22,7 +22,7 @@ jobs:
|
|
|
22
22
|
|
|
23
23
|
- name: Generate changelog
|
|
24
24
|
id: changelog
|
|
25
|
-
uses: orhun/git-cliff-action@
|
|
25
|
+
uses: orhun/git-cliff-action@a9a95522b26fe6403f7bb24031f21fb573d0f5ff # v4.9.1
|
|
26
26
|
with:
|
|
27
27
|
config: cliff.toml
|
|
28
28
|
args: --unreleased --verbose
|
|
@@ -30,7 +30,7 @@ jobs:
|
|
|
30
30
|
|
|
31
31
|
- name: Generate changelog
|
|
32
32
|
id: changelog
|
|
33
|
-
uses: orhun/git-cliff-action@
|
|
33
|
+
uses: orhun/git-cliff-action@a9a95522b26fe6403f7bb24031f21fb573d0f5ff # v4.9.1
|
|
34
34
|
with:
|
|
35
35
|
config: cliff.toml
|
|
36
36
|
args: --current --verbose
|
|
@@ -31,7 +31,7 @@ jobs:
|
|
|
31
31
|
|
|
32
32
|
- name: Check for new commits
|
|
33
33
|
id: check_commits
|
|
34
|
-
uses: isaac-cf-wong/detect-git-changes-action@
|
|
34
|
+
uses: isaac-cf-wong/detect-git-changes-action@a8b0d224a4fdff017607079f83f01f013b9d66a6 # v0.0.20
|
|
35
35
|
with:
|
|
36
36
|
use-latest-tag: true
|
|
37
37
|
|
|
@@ -22,7 +22,7 @@ jobs:
|
|
|
22
22
|
|
|
23
23
|
- name: Apply support policy (spec0, from pyproject tool table)
|
|
24
24
|
id: policy
|
|
25
|
-
uses: isaac-cf-wong/dependency-support-policy-action@
|
|
25
|
+
uses: isaac-cf-wong/dependency-support-policy-action@dfc24273d70d9730ede96b5fdef09a8d7887cf04 # v0.2.10
|
|
26
26
|
with:
|
|
27
27
|
mode: update
|
|
28
28
|
|
|
@@ -16,7 +16,7 @@ repos:
|
|
|
16
16
|
- id: check-json
|
|
17
17
|
|
|
18
18
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
19
|
-
rev: v0.16.
|
|
19
|
+
rev: v0.16.9
|
|
20
20
|
hooks:
|
|
21
21
|
- id: ruff
|
|
22
22
|
args: [--fix, --config=pyproject.toml]
|
|
@@ -28,13 +28,13 @@ repos:
|
|
|
28
28
|
- id: taplo-format
|
|
29
29
|
|
|
30
30
|
- repo: https://github.com/crate-ci/typos
|
|
31
|
-
rev: v1.50.
|
|
31
|
+
rev: v1.50.3
|
|
32
32
|
hooks:
|
|
33
33
|
- id: typos
|
|
34
34
|
args: []
|
|
35
35
|
|
|
36
36
|
- repo: https://github.com/rbubley/mirrors-prettier
|
|
37
|
-
rev: v3.9.
|
|
37
|
+
rev: v3.9.9
|
|
38
38
|
hooks:
|
|
39
39
|
- id: prettier
|
|
40
40
|
|
|
@@ -52,7 +52,7 @@ repos:
|
|
|
52
52
|
- id: actionlint
|
|
53
53
|
|
|
54
54
|
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
55
|
-
rev: 0.12.
|
|
55
|
+
rev: 0.12.21
|
|
56
56
|
hooks:
|
|
57
57
|
# Update the uv lockfile
|
|
58
58
|
- id: uv-lock
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: python-gitea
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.12.0
|
|
4
4
|
Summary: A Python package for interacting with the Gitea API, offering a simple interface to access repositories, users, organizations, issues, and more for automation and data management.
|
|
5
5
|
Project-URL: Documentation, https://isaac-cf-wong.github.io/python-gitea
|
|
6
6
|
Project-URL: Source, https://github.com/isaac-cf-wong/python-gitea
|
|
@@ -58,7 +58,7 @@ src/gitea/
|
|
|
58
58
|
│ ├── main.py # gitea-cli entry point, command registration
|
|
59
59
|
│ ├── config/ # config commands
|
|
60
60
|
│ ├── actions/ # actions workflow, run, job, artifact, secret, variable, runner commands
|
|
61
|
-
│ ├── issue/ # issue + issue
|
|
61
|
+
│ ├── issue/ # issue, issue dependency + issue label commands
|
|
62
62
|
│ ├── pull_request/ # pull-request commands
|
|
63
63
|
│ ├── comment/ # comment commands
|
|
64
64
|
│ ├── label/ # label commands
|
|
@@ -150,7 +150,8 @@ absence of any module-level import cycle anywhere in `gitea`.
|
|
|
150
150
|
|
|
151
151
|
The CLI is a single Typer application registered in `cli/main.py`. Each resource
|
|
152
152
|
has a command group (e.g. `gitea-cli issue`, `gitea-cli project`), and nested
|
|
153
|
-
groups exist where the domain nests (e.g. `project column`, `issue dependency
|
|
153
|
+
groups exist where the domain nests (e.g. `project column`, `issue dependency`,
|
|
154
|
+
`issue label`).
|
|
154
155
|
|
|
155
156
|
CLI commands reuse the client through thin helper functions in `cli/utils/`
|
|
156
157
|
(`auth.py` resolves authentication, `api.py` and `convert.py` handle requests
|
|
@@ -478,6 +478,36 @@ otherwise look like.
|
|
|
478
478
|
- `gitea-cli issue dependency remove --owner <owner> --repository <repo> --issue-id <number>`
|
|
479
479
|
- Required: `--dependency-owner <owner>`, `--dependency-repository <repo>`,
|
|
480
480
|
`--dependency-issue-id <number>`
|
|
481
|
+
- `gitea-cli issue label list --owner <owner> --repository <repo> --issue-id <number>`
|
|
482
|
+
- `gitea-cli issue label add --owner <owner> --repository <repo> --issue-id <number> --label <name-or-id>`
|
|
483
|
+
- Adds the labels and keeps the ones the issue already has.
|
|
484
|
+
- `gitea-cli issue label remove --owner <owner> --repository <repo> --issue-id <number> --label <name-or-id>`
|
|
485
|
+
- A label the issue does not carry is left alone: the command still
|
|
486
|
+
succeeds, logs a warning, and names the label's ID in `not_on_issue` in
|
|
487
|
+
the issue's metadata.
|
|
488
|
+
- `gitea-cli issue label set --owner <owner> --repository <repo> --issue-id <number> --label <name-or-id>`
|
|
489
|
+
- Replaces every label of the issue with the given ones.
|
|
490
|
+
- `gitea-cli issue label clear --owner <owner> --repository <repo> --issue-id <number>`
|
|
491
|
+
- Removes every label from the issue.
|
|
492
|
+
|
|
493
|
+
The `issue label` commands act on the labels an issue carries; the
|
|
494
|
+
[`label` commands](#label---manage-labels) manage the labels a repository
|
|
495
|
+
defines. In all of them:
|
|
496
|
+
|
|
497
|
+
- `--label` is repeated once per label, and takes a label's name or its numeric
|
|
498
|
+
ID. A name is resolved to its ID through the repository's labels before
|
|
499
|
+
anything is written, so it works on a Gitea that only accepts IDs. Names are
|
|
500
|
+
matched exactly, case included. A name that matches no label, or more than
|
|
501
|
+
one, fails the command and no issue is changed. A value made only of digits is
|
|
502
|
+
taken as an ID and sent as it is, which is how a label defined on the
|
|
503
|
+
organization rather than the repository is named.
|
|
504
|
+
- `--issue-id` can be repeated to act on several issues in one run. With one
|
|
505
|
+
issue, `data` is the list of labels the issue is left with. With several,
|
|
506
|
+
`data` holds one entry per issue, in the order given:
|
|
507
|
+
`{"issue_id": <number>, "labels": [...]}`, plus `not_on_issue` for `remove`.
|
|
508
|
+
The issues are changed one after another; if one fails, the command stops,
|
|
509
|
+
prints nothing on stdout, and its error names the issues that were already
|
|
510
|
+
changed.
|
|
481
511
|
|
|
482
512
|
### Pull Request - manage pull requests
|
|
483
513
|
|
|
@@ -886,6 +916,16 @@ gitea-cli issue create \
|
|
|
886
916
|
--milestone 3
|
|
887
917
|
```
|
|
888
918
|
|
|
919
|
+
Add a label to several existing issues, keeping the labels they already have:
|
|
920
|
+
|
|
921
|
+
```bash
|
|
922
|
+
gitea-cli issue label add \
|
|
923
|
+
--owner my-org \
|
|
924
|
+
--repository my-repo \
|
|
925
|
+
--issue-id 12 --issue-id 13 --issue-id 14 \
|
|
926
|
+
--label "needs review"
|
|
927
|
+
```
|
|
928
|
+
|
|
889
929
|
Start a workflow, then follow the run it started:
|
|
890
930
|
|
|
891
931
|
```bash
|
|
@@ -155,12 +155,12 @@ is simpler and sufficient.
|
|
|
155
155
|
| Client attribute | Gitea domain |
|
|
156
156
|
| --------------------- | ---------------------------------------------------------------------- |
|
|
157
157
|
| `client.actions` | Actions: workflows, runs, jobs, artifacts, secrets, variables, runners |
|
|
158
|
-
| `client.issue` | Issues and issue
|
|
158
|
+
| `client.issue` | Issues, issue dependencies and issue labels |
|
|
159
159
|
| `client.pull_request` | Pull requests |
|
|
160
160
|
| `client.repository` | Repositories |
|
|
161
161
|
| `client.user` | Users and user settings |
|
|
162
162
|
| `client.comment` | Issue comments |
|
|
163
|
-
| `client.label` |
|
|
163
|
+
| `client.label` | The labels a repository defines |
|
|
164
164
|
| `client.milestone` | Milestones |
|
|
165
165
|
| `client.notification` | Notifications |
|
|
166
166
|
| `client.project` | Projects, columns, and project issues |
|
|
@@ -29,7 +29,7 @@ dependencies = [
|
|
|
29
29
|
|
|
30
30
|
[dependency-groups]
|
|
31
31
|
dev = [
|
|
32
|
-
"ruff>=0.16.
|
|
32
|
+
"ruff>=0.16.9",
|
|
33
33
|
# The mutation runner, in the environment `uv run` resolves, so that
|
|
34
34
|
# `uv run mutmut run` reaches the same interpreter as `uv run pytest` and finds
|
|
35
35
|
# the pytest plugins the suite's own options need. Run from a tool environment
|
|
@@ -52,7 +52,7 @@ docs = [
|
|
|
52
52
|
"mike>=2.2.0",
|
|
53
53
|
]
|
|
54
54
|
build = ["hatch>=1.18.1"]
|
|
55
|
-
release = ["git-cliff>=2.
|
|
55
|
+
release = ["git-cliff>=2.14.2"]
|
|
56
56
|
|
|
57
57
|
[project.scripts]
|
|
58
58
|
gitea-cli = "gitea.cli.main:app"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""CLI commands for managing the labels of issues."""
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"""Add issue labels command."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Annotated
|
|
6
|
+
|
|
7
|
+
import typer
|
|
8
|
+
|
|
9
|
+
from gitea.cli.issue.label.common import ISSUE_IDS_HELP, LABEL_HELP
|
|
10
|
+
from gitea.cli.utils.options import REPOSITORY_REQUIRED_HELP
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def add_command(
|
|
14
|
+
ctx: typer.Context,
|
|
15
|
+
owner: Annotated[str, typer.Option("--owner", help="Owner of the repository.")],
|
|
16
|
+
repository: Annotated[str | None, typer.Option("--repository", help=REPOSITORY_REQUIRED_HELP)] = None,
|
|
17
|
+
issue_ids: Annotated[list[int] | None, typer.Option("--issue-id", help=ISSUE_IDS_HELP)] = None,
|
|
18
|
+
labels: Annotated[list[str] | None, typer.Option("--label", help=LABEL_HELP)] = None,
|
|
19
|
+
account_name: Annotated[
|
|
20
|
+
str | None,
|
|
21
|
+
typer.Option(
|
|
22
|
+
"--account-name",
|
|
23
|
+
help="Name of the account to use for authentication.",
|
|
24
|
+
),
|
|
25
|
+
] = None,
|
|
26
|
+
token: Annotated[
|
|
27
|
+
str | None,
|
|
28
|
+
typer.Option(
|
|
29
|
+
"--token",
|
|
30
|
+
help="Token for authentication. If not provided, the token from the specified account will be used.",
|
|
31
|
+
),
|
|
32
|
+
] = None,
|
|
33
|
+
base_url: Annotated[
|
|
34
|
+
str | None,
|
|
35
|
+
typer.Option(
|
|
36
|
+
"--base-url",
|
|
37
|
+
help="Base URL of the Gitea platform. If not provided, the base URL from the specified account will be used.",
|
|
38
|
+
),
|
|
39
|
+
] = None,
|
|
40
|
+
) -> None:
|
|
41
|
+
"""Add labels to one or more issues, keeping the labels they already have.
|
|
42
|
+
|
|
43
|
+
Args:
|
|
44
|
+
ctx: The Typer context.
|
|
45
|
+
owner: The owner of the repository.
|
|
46
|
+
repository: The name of the repository, which this command requires.
|
|
47
|
+
issue_ids: The issue numbers shown in the web UI.
|
|
48
|
+
labels: The labels, each a name or a numeric ID.
|
|
49
|
+
account_name: Name of the account to use for authentication.
|
|
50
|
+
token: Token for authentication.
|
|
51
|
+
base_url: Base URL of the Gitea platform.
|
|
52
|
+
|
|
53
|
+
"""
|
|
54
|
+
from typing import Any # noqa: PLC0415
|
|
55
|
+
|
|
56
|
+
from gitea.cli.issue.label.common import ( # noqa: PLC0415
|
|
57
|
+
for_each_issue,
|
|
58
|
+
require_issue_ids,
|
|
59
|
+
require_labels,
|
|
60
|
+
resolve_label_ids,
|
|
61
|
+
)
|
|
62
|
+
from gitea.cli.utils.api import execute_api_command # noqa: PLC0415
|
|
63
|
+
from gitea.cli.utils.auth import get_auth_params # noqa: PLC0415
|
|
64
|
+
from gitea.cli.utils.options import require_repository # noqa: PLC0415
|
|
65
|
+
from gitea.client.gitea import Gitea # noqa: PLC0415
|
|
66
|
+
|
|
67
|
+
command = "gitea-cli issue label add"
|
|
68
|
+
token, base_url = get_auth_params(
|
|
69
|
+
config_path=ctx.obj.get("config_path"),
|
|
70
|
+
account_name=account_name,
|
|
71
|
+
token=token,
|
|
72
|
+
base_url=base_url,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
def api_call() -> tuple[dict[str, Any] | list[dict[str, Any]], dict[str, Any]]:
|
|
76
|
+
"""Add the labels to each issue.
|
|
77
|
+
|
|
78
|
+
Returns:
|
|
79
|
+
A tuple containing the issue's resulting labels, or one entry per issue, and metadata.
|
|
80
|
+
|
|
81
|
+
"""
|
|
82
|
+
target_repository = require_repository(repository, command=command)
|
|
83
|
+
targets = require_issue_ids(issue_ids, command=command)
|
|
84
|
+
requested = require_labels(labels, command=command)
|
|
85
|
+
|
|
86
|
+
with Gitea(token=token, base_url=base_url) as client:
|
|
87
|
+
label_ids = resolve_label_ids(client, owner, target_repository, requested, command=command)
|
|
88
|
+
# POST appends to the issue's labels; PUT would replace them.
|
|
89
|
+
return for_each_issue(
|
|
90
|
+
targets,
|
|
91
|
+
lambda issue_id: client.issue.add_issue_labels(
|
|
92
|
+
owner=owner, repository=target_repository, index=issue_id, labels=list(label_ids)
|
|
93
|
+
),
|
|
94
|
+
command=command,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
execute_api_command(api_call=api_call, base_url=base_url, command_name=command)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"""Clear issue labels command."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Annotated
|
|
6
|
+
|
|
7
|
+
import typer
|
|
8
|
+
|
|
9
|
+
from gitea.cli.issue.label.common import ISSUE_IDS_HELP
|
|
10
|
+
from gitea.cli.utils.options import REPOSITORY_REQUIRED_HELP
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def clear_command(
|
|
14
|
+
ctx: typer.Context,
|
|
15
|
+
owner: Annotated[str, typer.Option("--owner", help="Owner of the repository.")],
|
|
16
|
+
repository: Annotated[str | None, typer.Option("--repository", help=REPOSITORY_REQUIRED_HELP)] = None,
|
|
17
|
+
issue_ids: Annotated[list[int] | None, typer.Option("--issue-id", help=ISSUE_IDS_HELP)] = None,
|
|
18
|
+
account_name: Annotated[
|
|
19
|
+
str | None,
|
|
20
|
+
typer.Option(
|
|
21
|
+
"--account-name",
|
|
22
|
+
help="Name of the account to use for authentication.",
|
|
23
|
+
),
|
|
24
|
+
] = None,
|
|
25
|
+
token: Annotated[
|
|
26
|
+
str | None,
|
|
27
|
+
typer.Option(
|
|
28
|
+
"--token",
|
|
29
|
+
help="Token for authentication. If not provided, the token from the specified account will be used.",
|
|
30
|
+
),
|
|
31
|
+
] = None,
|
|
32
|
+
base_url: Annotated[
|
|
33
|
+
str | None,
|
|
34
|
+
typer.Option(
|
|
35
|
+
"--base-url",
|
|
36
|
+
help="Base URL of the Gitea platform. If not provided, the base URL from the specified account will be used.",
|
|
37
|
+
),
|
|
38
|
+
] = None,
|
|
39
|
+
) -> None:
|
|
40
|
+
"""Remove every label from one or more issues.
|
|
41
|
+
|
|
42
|
+
Args:
|
|
43
|
+
ctx: The Typer context.
|
|
44
|
+
owner: The owner of the repository.
|
|
45
|
+
repository: The name of the repository, which this command requires.
|
|
46
|
+
issue_ids: The issue numbers shown in the web UI.
|
|
47
|
+
account_name: Name of the account to use for authentication.
|
|
48
|
+
token: Token for authentication.
|
|
49
|
+
base_url: Base URL of the Gitea platform.
|
|
50
|
+
|
|
51
|
+
"""
|
|
52
|
+
from typing import Any # noqa: PLC0415
|
|
53
|
+
|
|
54
|
+
from gitea.cli.issue.label.common import for_each_issue, require_issue_ids # noqa: PLC0415
|
|
55
|
+
from gitea.cli.utils.api import execute_api_command # noqa: PLC0415
|
|
56
|
+
from gitea.cli.utils.auth import get_auth_params # noqa: PLC0415
|
|
57
|
+
from gitea.cli.utils.options import require_repository # noqa: PLC0415
|
|
58
|
+
from gitea.client.gitea import Gitea # noqa: PLC0415
|
|
59
|
+
|
|
60
|
+
command = "gitea-cli issue label clear"
|
|
61
|
+
token, base_url = get_auth_params(
|
|
62
|
+
config_path=ctx.obj.get("config_path"),
|
|
63
|
+
account_name=account_name,
|
|
64
|
+
token=token,
|
|
65
|
+
base_url=base_url,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
def api_call() -> tuple[dict[str, Any] | list[dict[str, Any]], dict[str, Any]]:
|
|
69
|
+
"""Remove every label from each issue.
|
|
70
|
+
|
|
71
|
+
Returns:
|
|
72
|
+
A tuple containing the issue's resulting labels, or one entry per issue, and metadata.
|
|
73
|
+
|
|
74
|
+
"""
|
|
75
|
+
target_repository = require_repository(repository, command=command)
|
|
76
|
+
targets = require_issue_ids(issue_ids, command=command)
|
|
77
|
+
|
|
78
|
+
def clear(issue_id: int) -> tuple[list[dict[str, Any]], dict[str, Any]]:
|
|
79
|
+
"""Remove every label from one issue, and read back what it is left with.
|
|
80
|
+
|
|
81
|
+
Args:
|
|
82
|
+
issue_id: The issue to clear.
|
|
83
|
+
|
|
84
|
+
Returns:
|
|
85
|
+
A tuple containing the issue's resulting labels and metadata.
|
|
86
|
+
|
|
87
|
+
"""
|
|
88
|
+
client.issue.clear_issue_labels(owner=owner, repository=target_repository, index=issue_id)
|
|
89
|
+
return client.issue.list_issue_labels(owner=owner, repository=target_repository, index=issue_id)
|
|
90
|
+
|
|
91
|
+
with Gitea(token=token, base_url=base_url) as client:
|
|
92
|
+
return for_each_issue(targets, clear, command=command)
|
|
93
|
+
|
|
94
|
+
execute_api_command(api_call=api_call, base_url=base_url, command_name=command)
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
"""What the `issue label` commands share: reading labels and issues, and reporting per issue.
|
|
2
|
+
|
|
3
|
+
A label is named on the command line by its name or by its numeric ID. Names are
|
|
4
|
+
resolved to IDs here, through the repository's label listing, rather than sent to
|
|
5
|
+
the API as they are: only a recent Gitea accepts names in an issue's label list,
|
|
6
|
+
and one that does not rejects the whole request. Resolving first also means an
|
|
7
|
+
unknown name is an error before anything is written, rather than a label silently
|
|
8
|
+
not applied, and before the first of several issues has been changed.
|
|
9
|
+
|
|
10
|
+
A value made only of ASCII digits is taken to be an ID and is sent as it is,
|
|
11
|
+
without being looked up. That is what lets a label defined on the organization,
|
|
12
|
+
which the repository's listing does not include, be applied at all.
|
|
13
|
+
|
|
14
|
+
Every command takes one `--issue-id` or several. With one, `data` is that issue's
|
|
15
|
+
labels, as `gitea-cli issue label list` emits them. With several, `data` holds one
|
|
16
|
+
entry per issue, `{"issue_id": ..., "labels": [...]}`, in the order the issues were
|
|
17
|
+
given, so that which issue was left with which labels can be read back. The shape
|
|
18
|
+
follows from how the command was invoked, never from what the API answered.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
from __future__ import annotations
|
|
22
|
+
|
|
23
|
+
import logging
|
|
24
|
+
import re
|
|
25
|
+
from collections.abc import Callable
|
|
26
|
+
from typing import TYPE_CHECKING, Any
|
|
27
|
+
|
|
28
|
+
from gitea.cli.utils.errors import CommandError
|
|
29
|
+
from gitea.utils.pagination import PAGE_SIZE, collect_all_pages
|
|
30
|
+
|
|
31
|
+
if TYPE_CHECKING:
|
|
32
|
+
from gitea.client.gitea import Gitea
|
|
33
|
+
|
|
34
|
+
logger = logging.getLogger("gitea")
|
|
35
|
+
|
|
36
|
+
ISSUE_IDS_HELP = "Issue number shown in the web UI. Repeat the option to act on several issues."
|
|
37
|
+
LABEL_HELP = "Label name or numeric ID. Repeat the option for several labels."
|
|
38
|
+
|
|
39
|
+
_NUMERIC_ID = re.compile(r"[0-9]+")
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def require_issue_ids(issue_ids: list[int] | None, *, command: str) -> list[int]:
|
|
43
|
+
"""Read the issues a command acts on.
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
issue_ids: The values passed as --issue-id, or None when it was omitted.
|
|
47
|
+
command: The command being run, named as the user invoked it.
|
|
48
|
+
|
|
49
|
+
Returns:
|
|
50
|
+
The issue numbers, in the order given, each once.
|
|
51
|
+
|
|
52
|
+
Raises:
|
|
53
|
+
CommandError: If no issue was given.
|
|
54
|
+
|
|
55
|
+
"""
|
|
56
|
+
if not issue_ids:
|
|
57
|
+
raise CommandError(f"'{command}' needs an issue: pass --issue-id NUMBER, once per issue.")
|
|
58
|
+
return list(dict.fromkeys(issue_ids))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def require_labels(labels: list[str] | None, *, command: str, hint: str = "") -> list[str]:
|
|
62
|
+
"""Read the labels a command acts on.
|
|
63
|
+
|
|
64
|
+
Args:
|
|
65
|
+
labels: The values passed as --label, or None when it was omitted.
|
|
66
|
+
command: The command being run, named as the user invoked it.
|
|
67
|
+
hint: A sentence appended to the error, pointing at a command that needs no label.
|
|
68
|
+
|
|
69
|
+
Returns:
|
|
70
|
+
The labels, as they were given.
|
|
71
|
+
|
|
72
|
+
Raises:
|
|
73
|
+
CommandError: If no label was given.
|
|
74
|
+
|
|
75
|
+
"""
|
|
76
|
+
if not labels:
|
|
77
|
+
message = f"'{command}' needs a label: pass --label NAME_OR_ID, once per label."
|
|
78
|
+
raise CommandError(f"{message} {hint}" if hint else message)
|
|
79
|
+
return labels
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def resolve_label_ids(client: Gitea, owner: str, repository: str, labels: list[str], *, command: str) -> list[int]:
|
|
83
|
+
"""Resolve the labels given on the command line to their IDs.
|
|
84
|
+
|
|
85
|
+
The repository's labels are listed only when a name has to be resolved, and
|
|
86
|
+
then only once for all of them.
|
|
87
|
+
|
|
88
|
+
Args:
|
|
89
|
+
client: The client to list the repository's labels with.
|
|
90
|
+
owner: The owner of the repository.
|
|
91
|
+
repository: The name of the repository.
|
|
92
|
+
labels: The labels, each a name or a numeric ID.
|
|
93
|
+
command: The command being run, named as the user invoked it.
|
|
94
|
+
|
|
95
|
+
Returns:
|
|
96
|
+
The label IDs, in the order given, each once.
|
|
97
|
+
|
|
98
|
+
Raises:
|
|
99
|
+
CommandError: If a name matches no label of the repository, or more than one.
|
|
100
|
+
|
|
101
|
+
"""
|
|
102
|
+
names = [label for label in labels if not _NUMERIC_ID.fullmatch(label)]
|
|
103
|
+
by_name: dict[str, list[int]] = {}
|
|
104
|
+
if names:
|
|
105
|
+
defined, _ = collect_all_pages(
|
|
106
|
+
lambda page: client.label.list_labels(owner=owner, repository=repository, page=page, limit=PAGE_SIZE)
|
|
107
|
+
)
|
|
108
|
+
for label in defined:
|
|
109
|
+
by_name.setdefault(label["name"], []).append(label["id"])
|
|
110
|
+
|
|
111
|
+
unknown = [name for name in names if name not in by_name]
|
|
112
|
+
if unknown:
|
|
113
|
+
raise CommandError(
|
|
114
|
+
f"'{command}': no label named {', '.join(repr(name) for name in unknown)} in {owner}/{repository}. "
|
|
115
|
+
f"Names are matched exactly, case included; 'gitea-cli label list' shows the repository's labels. "
|
|
116
|
+
f"A label defined on the organization is not looked up by name: pass its numeric ID."
|
|
117
|
+
)
|
|
118
|
+
ambiguous = [name for name in names if len(by_name[name]) > 1]
|
|
119
|
+
if ambiguous:
|
|
120
|
+
raise CommandError(
|
|
121
|
+
f"'{command}': more than one label is named {', '.join(repr(name) for name in ambiguous)} "
|
|
122
|
+
f"in {owner}/{repository}. Pass the numeric ID of the one you mean."
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
ids = [int(label) if _NUMERIC_ID.fullmatch(label) else by_name[label][0] for label in labels]
|
|
126
|
+
return list(dict.fromkeys(ids))
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def for_each_issue(
|
|
130
|
+
issue_ids: list[int],
|
|
131
|
+
action: Callable[[int], tuple[list[dict[str, Any]], dict[str, Any]]],
|
|
132
|
+
*,
|
|
133
|
+
command: str,
|
|
134
|
+
) -> tuple[list[dict[str, Any]], dict[str, Any]]:
|
|
135
|
+
"""Run a command on each issue in turn and shape what it reports.
|
|
136
|
+
|
|
137
|
+
The issues are acted on one after another, so a failure part-way leaves the
|
|
138
|
+
ones before it changed. The error then names them, since the command prints
|
|
139
|
+
nothing on stdout when it fails and the caller could not tell otherwise.
|
|
140
|
+
|
|
141
|
+
Args:
|
|
142
|
+
issue_ids: The issues to act on.
|
|
143
|
+
action: Callable acting on one issue and returning its resulting labels
|
|
144
|
+
and the metadata of the last response. Extra keys in the metadata
|
|
145
|
+
beyond `status_code` are reported with that issue.
|
|
146
|
+
command: The command being run, named as the user invoked it.
|
|
147
|
+
|
|
148
|
+
Returns:
|
|
149
|
+
A tuple containing the data and the metadata of the envelope: for one
|
|
150
|
+
issue, its labels and its metadata; for several, one entry per issue.
|
|
151
|
+
|
|
152
|
+
Raises:
|
|
153
|
+
CommandError: If acting on an issue after the first failed. A failure
|
|
154
|
+
on the first issue is raised as it was, since nothing else changed.
|
|
155
|
+
|
|
156
|
+
"""
|
|
157
|
+
entries: list[dict[str, Any]] = []
|
|
158
|
+
metadata: dict[str, Any] = {}
|
|
159
|
+
for issue_id in issue_ids:
|
|
160
|
+
try:
|
|
161
|
+
labels, metadata = action(issue_id)
|
|
162
|
+
except Exception as e:
|
|
163
|
+
if not entries:
|
|
164
|
+
raise
|
|
165
|
+
done = ", ".join(str(entry["issue_id"]) for entry in entries)
|
|
166
|
+
raise CommandError(
|
|
167
|
+
f"'{command}' failed on issue {issue_id}: {e}. "
|
|
168
|
+
f"Issues {done} were already done, and issue {issue_id} may be partly done; "
|
|
169
|
+
f"the rest were not attempted."
|
|
170
|
+
) from e
|
|
171
|
+
extra = {key: value for key, value in metadata.items() if key != "status_code"}
|
|
172
|
+
entries.append({"issue_id": issue_id, "labels": labels, **extra})
|
|
173
|
+
|
|
174
|
+
if len(entries) == 1:
|
|
175
|
+
return entries[0]["labels"], metadata
|
|
176
|
+
return entries, {"status_code": metadata["status_code"]}
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
def remove_carried_labels(
|
|
180
|
+
client: Gitea, owner: str, repository: str, issue_id: int, label_ids: list[int]
|
|
181
|
+
) -> tuple[list[dict[str, Any]], dict[str, Any]]:
|
|
182
|
+
"""Remove from one issue those of the labels it carries, and read back what it is left with.
|
|
183
|
+
|
|
184
|
+
A label the issue does not carry is not an error: removing it would leave the
|
|
185
|
+
issue as it is either way, and a command run over several issues meets that
|
|
186
|
+
routinely. It is not silent either: it is logged, and named in the metadata
|
|
187
|
+
as `not_on_issue`, so a caller can tell a removal from a label that was never
|
|
188
|
+
there.
|
|
189
|
+
|
|
190
|
+
Args:
|
|
191
|
+
client: The client to act with.
|
|
192
|
+
owner: The owner of the repository.
|
|
193
|
+
repository: The name of the repository.
|
|
194
|
+
issue_id: The issue to remove the labels from.
|
|
195
|
+
label_ids: The IDs of the labels to remove.
|
|
196
|
+
|
|
197
|
+
Returns:
|
|
198
|
+
A tuple containing the issue's resulting labels, and metadata naming the
|
|
199
|
+
IDs of the requested labels it did not carry.
|
|
200
|
+
|
|
201
|
+
"""
|
|
202
|
+
current, _ = client.issue.list_issue_labels(owner=owner, repository=repository, index=issue_id)
|
|
203
|
+
carried = {label["id"] for label in current}
|
|
204
|
+
absent = [label_id for label_id in label_ids if label_id not in carried]
|
|
205
|
+
if absent:
|
|
206
|
+
logger.warning(
|
|
207
|
+
"Issue %s does not carry label %s; left as it is.",
|
|
208
|
+
issue_id,
|
|
209
|
+
", ".join(str(label_id) for label_id in absent),
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
for label_id in label_ids:
|
|
213
|
+
if label_id in carried:
|
|
214
|
+
client.issue.remove_issue_label(owner=owner, repository=repository, index=issue_id, label=label_id)
|
|
215
|
+
|
|
216
|
+
remaining, metadata = client.issue.list_issue_labels(owner=owner, repository=repository, index=issue_id)
|
|
217
|
+
return remaining, {**metadata, "not_on_issue": absent}
|