Skip to content

Releases: Trenza1ore/GitCode-API

1.3.3 - Argument Refinement on More Methods

16 Jun 14:56

Choose a tag to compare

Feature

  • Explicit query parameters on mutation methods: methods that previously accepted **payload now 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, and repos.upload. A trailing **kwargs preserves backward compatibility.
  • Release artefact upload now returning httpx response: releases.upload now returns the httpx.Response from the upload PUT request instead of None, letting callers inspect status codes and headers.

Fix

  • Async issue creation kwargs: AsyncIssuesResource.create now correctly forwards **kwargs into the request body (the sync variant already did).

Docs

  • Removed **payload / **params references: README, CLI help text, and CLI docs no longer mention **payload or **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

14 Jun 09:24

Choose a tag to compare

Feature

  • Explicit query parameters on listing methods: 11 "list" methods that previously accepted only **params now 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, and repos.get_download_statistics. A trailing **kwargs preserves 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

12 Jun 19:35

Choose a tag to compare

Feature

  • Issue creation template_path: client.issues.create now accepts an optional template_path parameter, 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 copybutton extension).

Full Changelog: 1.3.0...1.3.1

1.3.0 - Refactor Resource Groups

08 Jun 16:35

Choose a tag to compare

Feature

  • Public models and exceptions modules: response models and exception classes are now importable from gitcode_api.models and gitcode_api.exceptions respectively, giving users a stable, documented import path instead of reaching into private _models / _exceptions internals.

Refactor

  • Resource sub-packages: the resources/account.py, resources/collaboration.py, resources/misc.py, and resources/repositories.py files 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

04 Jun 20:31

Choose a tag to compare

Feature

  • Authentication errors: 401 responses now raise GitCodeUnauthorizedError (a subclass of GitCodeHTTPStatusError), and token-related 401s raise the more specific GitCodeTokenError, 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-code workflow and renamed the workflow from "Code format" to "CI".

Docs

  • README badges: added a CI status badge to both README.md and README.zh.md.

Full Changelog: 1.2.20...1.2.21

1.2.20 - Support Non-UTF-8 Templates & Update Async Method Signature

27 May 15:54

Choose a tag to compare

Feature

  • Issue and pull request templates: get_template methods for fetching issue and pull request templates now accept encoding (default to "utf-8") and optional decoding_kwargs forwarded to bytes.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 **params or **payload as 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

18 May 13:17

Choose a tag to compare

Feature

  • Issue and pull request templates (for GitHub mirror repos): list_templates method now also walk each candidate repository's .github/ directory as well, so we can support GitHub-mirrored projects that keep ISSUE_TEMPLATE* and PULL_REQUEST_TEMPLATE* files under .github/ instead of .gitcode/.

Refactor

  • gitcode_api.constants: move GITCODE_ISSUE_TEMPLATE_PATH_RE and GITCODE_PULL_REQUEST_TEMPLATE_PATH_RE to gitcode_api.constants, and add GITCODE_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

18 May 12:18

Choose a tag to compare

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 str as output.
  • Version metadata (source checkout): Improved logic for resolving __version__ and __build_hash__ in local development environment.

Fix

  • Typing: py.typed is 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

15 May 17:55

Choose a tag to compare

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 --version and 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_BUNDLE environment names used by the client.

Fix

  • Packaging: Wheel/sdist installs now ship py.typed via setuptools package-data, so type checkers can honor inline typing for the package.

Docs

  • SDK reference HTML: After each docs build, scripts/docs_rename_resource_methods.py rewrites 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

13 May 17:19

Choose a tag to compare

Feature

  • Default CA Bundle: When the internal GitCode client builds its own httpx client (you do not pass http_client=), verification uses the path from GITCODE_CA_BUNDLE if set, otherwise REQUESTS_CA_BUNDLE if set (same convention as many Python HTTP stacks), otherwise the default CA bundle is used. Applies to both GitCode and AsyncGitCode.

Full Changelog: 1.2.15...1.2.16