Skip to content

Releases: Trenza1ore/GitCode-API

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

1.2.15 - Minor Typing Update

13 May 16:25

Choose a tag to compare

Typing

  • openJiuwen adapter (gitcode_api.llm.jiuwen): Silence mypy import-untyped on the TYPE_CHECKING import of LocalFunction from optional openjiuwen (no runtime or public API change). Now we fully pass mypy checks!

Full Changelog: 1.2.14...1.2.15

1.2.14 - Issue & Pull Request Templates, Documentation Improvement

13 May 15:28

Choose a tag to compare

Feature

  • Issue and pull request templates: client.issues / client.pulls (and async counterparts) now expose list_templates and get_template for GitCode’s .gitcode/ issue and PR template files on the default branch, including metadata (RepositoryGitCodeTemplate with path, SHA, and resolved template_owner / template_repo). GitCode does not expose this as a dedicated REST “list/get templates” API, so the SDK composes the behavior from repository content calls with custom resolution logic (active template paths, default branch, and upstream template sources). The CLI picks these up automatically as issues list-templates, issues get-template, pulls list-templates, and pulls get-template.
  • as_dict: Top-level helper to turn one APIObject (or a list of them) into plain dict values via to_dict, with an optional deep_copy flag for isolated mappings.
  • Repository model: Responses can include a parent field describing the upstream source repository when the API returns it.

Refactor

  • Models: Dropped unused legacy TypedDict definitions from gitcode_api._models (no public API change).

Docs

  • Homepage and REST API index: added a short “Why this project” section and clarified that the REST mirror is based on GitCode Help material but manually corrected and extended in this repo.
  • README and SDK docs updated for template listing/fetching; runnable examples under examples/ for issue and pull request templates.

Full Changelog: 1.2.13...1.2.14

1.2.13 - Support ALL Release Operations in Latest Official REST API Docs

12 May 17:57

Choose a tag to compare

Feature

  • Releases (client.releases / async parity): Reworked to match the current GitCode API — create, tag-based update, list with direction / page / per_page, get / get_by_tag / get_latest with documented query options, get_upload_url and upload (input bytes or local file path) for attachments, and download_attachment for raw bytes.
  • Models: Release now exposes assets and release_status; upload URL responses use ReleaseUploadURL.

Breaking Change

  • GitCode.releases.update: Targets a release by tag in the URL path (tag=…) instead of release_id; the JSON body is name, body, and optional release_status only (no tag_name in the payload). Update any code that still passed release_id or relied on the old request shape.

Docs

  • REST API mirror: release create/upload and related pages, missing release topics, and table cleanup; SDK release documentation updated for the new methods and parameters.
  • Added example examples/sync_github_release_to_gitcode.py.

Full Changelog: 1.2.12...1.2.13

1.2.12 - Improve CLI User Experience & Add Homepage to Project

11 May 14:35

Choose a tag to compare

Feature

  • CLI: -e / --escape takes a string of \-style escape sequences (for example "\n\t") to un-escape, which makes multiline payloads easier for human users (e.g. gitcode-api pulls create ... --body 'Line1\nLine2' -e '\n').
  • CLI: The shared cli argument parser no longer passes --owner / --repo into the GitCode client constructor. Use each method’s own flags so defaults match the SDK method signatures.
  • CLI (gitcode-api serve): --show-banner / -b accepts true or false and forwards to FastMCP’s run(show_banner=…); omit it to keep the library default.
  • CLI (gitcode-api serve): --transport is validated against stdio, http, and sse.

Docs

  • Added a homepage for this project: https://hugohuang.com/gitcode-api
  • README, SDK CLI page (docs/sdk/cli.rst), install_mcp_server.md, and PyPI homepage links updated for the new CLI and MCP options.
  • Download stat & PyPI version badges now are mutated automatically per-release to suit GitCode's image-caching strategy for README.md.

Full Changelog: 1.2.11...1.2.12

1.2.11 - Minor Refactor for User Experience

07 May 14:58

Choose a tag to compare

Feature

  • gitcode_api.llm: GitCodeLLMTool is eagerly imported and exposed in namespace, easier for custom adapters, MCP wiring, and static analysis.
  • LLM adapters (OpenAI, openJiuwen): GitCodeOpenAITool, create_openjiuwen_gitcode_api_tool, and the openJiuwen binding use explicit keyword parameters for GitCode clients (client, async_client, api_key, base_url, timeout, decrypt, owner, repo) instead of a **kwargs catch-all — clearer signatures, better editor hints, and the same ordering as GitCodeLLMTool.

Docs

  • README and SDK LLM guide use consistent “unified tool” wording for gitcode_api_tool.
  • Changelog section titles point at GitHub release pages; markdown structure cleaned up.

File Layout Improvement

  • PyInstaller spec moved to scripts/gitcode-api.spec; make binary and the release-binaries workflow call that path (repo root stays simpler).
  • scripts/build_manifest.py emits a transient .mcpbignore for MCP bundle packing; tracked top-level .mcpbignore was removed — make mcpb still removes generated artifacts afterward.

Full Changelog: 1.2.10...1.2.11

1.2.10 - Improve OpenAI Tool Usage Experience

07 May 11:39

Choose a tag to compare

Feature

  • OpenAI tool (GitCodeOpenAITool): Invocation results are now JSON strings (str) from json.dumps with ensure_ascii=False, so payloads fit Chat Completions tool message content without extra serialization. indent controls formatting (default 2; pass None for compact single-line JSON).

  • OpenAI tool constructor: async_mode defaults to False. Use async_mode=True and await the coroutine returned from the instance — the async keyword alias for async mode is no longer accepted on GitCodeOpenAITool.

Docs

  • README (English and Chinese), SDK LLM guide, and new runnable example examples/openai_tool_call.py updated for string tool results and a multi-turn Chat Completions loop.

Full Changelog: 1.2.9...1.2.10