Releases: Trenza1ore/GitCode-API
Releases · Trenza1ore/GitCode-API
1.3.3 - Argument Refinement on More Methods
Feature
- Explicit query parameters on mutation methods: methods that previously accepted
**payloadnow expose documented query parameters as named keyword arguments —orgs.create_repo,orgs.update,webhooks.create,webhooks.update,pulls.request_test,repos.set_org_repo_status,repos.transfer_to_org,repos.transfer,repos.update_transition,repos.update_push_config,repos.update_repo_settings,repos.update_pull_request_settings, andrepos.upload. A trailing**kwargspreserves backward compatibility. - Release artefact upload now returning httpx response:
releases.uploadnow returns thehttpx.Responsefrom the upload PUT request instead ofNone, letting callers inspect status codes and headers.
Fix
- Async issue creation kwargs:
AsyncIssuesResource.createnow correctly forwards**kwargsinto the request body (the sync variant already did).
Docs
- Removed
**payload/**paramsreferences: README, CLI help text, and CLI docs no longer mention**payloador**params; they now describe extra arguments generically. - Updated README badges: PyPI download badge switched to monthly + total (via pepy.tech).
Full Changelog: 1.3.2...1.3.3
1.3.2 - Argument Refinement on Listing Methods
Feature
- Explicit query parameters on listing methods: 11 "list" methods that previously accepted only
**paramsnow expose some documented query parameters as named keyword arguments —pulls.list,pulls.list_operation_logs,pulls.list_enterprise,pulls.list_org,issues.list_enterprise,issues.list_user,issues.list_org,issues.list_enterprise_comments,milestones.list,users.list_repos, andrepos.get_download_statistics. A trailing**kwargspreserves backward compatibility for any extra or undocumented parameters.
Full Changelog: 1.3.1...1.3.2
1.3.1 - Support template_path in Issue Creation & Docs Updates
Feature
- Issue creation
template_path:client.issues.createnow accepts an optionaltemplate_pathparameter, potentially letting you use a repository issue template. However, GitCode doesn't seem to set it up correctly...
Docs
- Copy button on code blocks: documentation code blocks now include a one-click copy button (Sphinx
copybuttonextension).
Full Changelog: 1.3.0...1.3.1
1.3.0 - Refactor Resource Groups
Feature
- Public
modelsandexceptionsmodules: response models and exception classes are now importable fromgitcode_api.modelsandgitcode_api.exceptionsrespectively, giving users a stable, documented import path instead of reaching into private_models/_exceptionsinternals.
Refactor
- Resource sub-packages: the
resources/account.py,resources/collaboration.py,resources/misc.py, andresources/repositories.pyfiles have been split (e.g.resources/collaboration/pulls_resource_group.py). The public client API (client.pulls,client.issues, etc.) is unchanged. - Docstrings on ABCs: resource method documentation now lives on abstract base classes, avoiding de-synchronization.
Full Changelog: 1.2.21...1.3.0
1.2.21 - Finer-Grain Authentication Errors
Feature
- Authentication errors: 401 responses now raise
GitCodeUnauthorizedError(a subclass ofGitCodeHTTPStatusError), and token-related 401s raise the more specificGitCodeTokenError, making it easier to catch and handle expired or invalid tokens without inspecting status codes manually.
Fix
- CI workflow: corrected a duplicate step name in the
check-codeworkflow and renamed the workflow from "Code format" to "CI".
Docs
- README badges: added a CI status badge to both
README.mdandREADME.zh.md.
Full Changelog: 1.2.20...1.2.21
1.2.20 - Support Non-UTF-8 Templates & Update Async Method Signature
Feature
- Issue and pull request templates:
get_templatemethods for fetching issue and pull request templates now acceptencoding(default to"utf-8") and optionaldecoding_kwargsforwarded tobytes.decode, so non-UTF-8 template files can be read with the codec and error handling of your choice!
Fix
- Async client method signatures: several async methods that previously took a catch-all
**paramsor**payloadas input now use the same keyword arguments as their sync counterparts.
GitHub Action
- check-code: new workflow that runs on push & PR, checking code style (via
ruff) and ensuring all unit tests pass.
Full Changelog: 1.2.19...1.2.20
1.2.19 - Support GitHub Mirror Repos in Issue / PR Template Fetching
Feature
- Issue and pull request templates (for GitHub mirror repos):
list_templatesmethod now also walk each candidate repository's.github/directory as well, so we can support GitHub-mirrored projects that keepISSUE_TEMPLATE*andPULL_REQUEST_TEMPLATE*files under.github/instead of.gitcode/.
Refactor
- gitcode_api.constants: move
GITCODE_ISSUE_TEMPLATE_PATH_REandGITCODE_PULL_REQUEST_TEMPLATE_PATH_REtogitcode_api.constants, and addGITCODE_TEMPLATE_REPO; path patterns match both.gitcode/and.github/template locations.
Docs
- SDK client API: Template resolution notes describe
.github/support for GitHub-mirrored repositories.
Full Changelog: 1.2.18...1.2.19
1.2.18 - Decrypt API Keys at Request Headers Construction
Feature
- Decrypt at request headers construction: Provided GitCode API token is now decrypted at request headers construction instead of at client constructor due to security concerns, constructor will merely validate it produces a
stras output. - Version metadata (source checkout): Improved logic for resolving
__version__and__build_hash__in local development environment.
Fix
- Typing:
py.typedis now an empty PEP 561 marker as one would expect.
Examples
- examples/sync_github_release_to_gitcode.py: Filters release assets by filename pattern, adds tqdm descriptions and clearer status output for create/skip/upload paths.
Full Changelog: 1.2.17...1.2.18
1.2.17 - Minor Version: Docs & Typing Improvements, Expose Build Hash
Feature
- Version metadata:
__version__is taken from the installed distribution (importlib.metadata), and a new__build_hash__value is exposed for telling builds apart.gitcode-api --versionand the no-argument welcome banner include the build id; the banner also prints Home Page and Docs links (homepage URL comes from package Project-URL metadata when present). - gitcode_api.constants: New documented module with the default API base URL, HTTP timeout, and the
GITCODE_ACCESS_TOKEN/GITCODE_CA_BUNDLEenvironment names used by the client.
Fix
- Packaging: Wheel/sdist installs now ship
py.typedvia setuptoolspackage-data, so type checkers can honor inline typing for the package.
Docs
- SDK reference HTML: After each docs build,
scripts/docs_rename_resource_methods.pyrewrites generated autosummary method labels on the client API page so grouped resource methods read with clearer names; Read the Docs runs this step in its build.
Examples
- examples/sync_github_release_to_gitcode.py: Reworked for clearer flow and alignment with current release upload behavior.
Full Changelog: 1.2.16...1.2.17
1.2.16 - Load Default CA Certificate from Environment Variables
Feature
- Default CA Bundle: When the internal
GitCodeclient builds its ownhttpxclient (you do not passhttp_client=), verification uses the path fromGITCODE_CA_BUNDLEif set, otherwiseREQUESTS_CA_BUNDLEif set (same convention as many Python HTTP stacks), otherwise the default CA bundle is used. Applies to bothGitCodeandAsyncGitCode.
Full Changelog: 1.2.15...1.2.16