gitcode-api 1.2.17__tar.gz → 1.2.19__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.
Files changed (52) hide show
  1. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/PKG-INFO +9 -9
  2. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/README.md +1 -1
  3. gitcode_api-1.2.19/gitcode_api/__init__.py +55 -0
  4. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/_base_client.py +15 -5
  5. gitcode_api-1.2.19/gitcode_api/constants.py +25 -0
  6. gitcode_api-1.2.19/gitcode_api/py.typed +0 -0
  7. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/resources/_shared.py +9 -12
  8. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/resources/collaboration.py +9 -2
  9. gitcode_api-1.2.19/gitcode_api/version.txt +1 -0
  10. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api.egg-info/PKG-INFO +9 -9
  11. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/pyproject.toml +9 -9
  12. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/tests/test_build_manifest.py +5 -24
  13. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/tests/test_collaboration_templates.py +90 -1
  14. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/tests/test_resources_misc.py +1 -1
  15. gitcode_api-1.2.17/gitcode_api/__init__.py +0 -34
  16. gitcode_api-1.2.17/gitcode_api/constants.py +0 -8
  17. gitcode_api-1.2.17/gitcode_api/py.typed +0 -1
  18. gitcode_api-1.2.17/gitcode_api/version.txt +0 -1
  19. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/LICENSE +0 -0
  20. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/__main__.py +0 -0
  21. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/_base_resource.py +0 -0
  22. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/_cli_banner.py +0 -0
  23. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/_client.py +0 -0
  24. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/_exceptions.py +0 -0
  25. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/_models.py +0 -0
  26. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/cli.py +0 -0
  27. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/llm/__init__.py +0 -0
  28. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/llm/_tool.py +0 -0
  29. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/llm/jiuwen.py +0 -0
  30. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/llm/mcp.py +0 -0
  31. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/llm/openai.py +0 -0
  32. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/resources/__init__.py +0 -0
  33. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/resources/account.py +0 -0
  34. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/resources/misc.py +0 -0
  35. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/resources/repositories.py +0 -0
  36. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/run_mcp.py +0 -0
  37. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api/utils.py +0 -0
  38. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api.egg-info/SOURCES.txt +0 -0
  39. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api.egg-info/dependency_links.txt +0 -0
  40. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api.egg-info/entry_points.txt +0 -0
  41. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api.egg-info/requires.txt +0 -0
  42. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/gitcode_api.egg-info/top_level.txt +0 -0
  43. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/setup.cfg +0 -0
  44. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/tests/test_base_client.py +0 -0
  45. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/tests/test_cli.py +0 -0
  46. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/tests/test_client.py +0 -0
  47. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/tests/test_llm_tools.py +0 -0
  48. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/tests/test_models.py +0 -0
  49. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/tests/test_resources_account.py +0 -0
  50. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/tests/test_resources_collaboration.py +0 -0
  51. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/tests/test_resources_repositories.py +0 -0
  52. {gitcode_api-1.2.17 → gitcode_api-1.2.19}/tests/test_utils.py +0 -0
@@ -1,16 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitcode-api
3
- Version: 1.2.17
3
+ Version: 1.2.19
4
4
  Summary: Easy to use Python SDK for the GitCode REST API. Providing builtin CLI tool, and optional LLM integration (MCP, OpenAI tool, and openJiuwen tool) for agents. Community-maintained.
5
5
  Author-email: Hugo Huang <hugo@hugohuang.com>
6
6
  License-Expression: MIT
7
- Project-URL: changelog, https://gitcode-api.readthedocs.io/en/latest/changelog.html
8
- Project-URL: issues, https://github.com/Trenza1ore/GitCode-API/issues
9
- Project-URL: documentation, https://gitcode-api.readthedocs.io
10
- Project-URL: gitcode, https://gitcode.com/SushiNinja/GitCode-API
11
- Project-URL: github, https://github.com/Trenza1ore/GitCode-API
12
- Project-URL: homepage, https://hugohuang.com/gitcode-api
13
- Project-URL: author, https://hugohuang.com
7
+ Project-URL: Changelog, https://gitcode-api.readthedocs.io/en/latest/changelog.html
8
+ Project-URL: Issues, https://github.com/Trenza1ore/GitCode-API/issues
9
+ Project-URL: Documentation, https://gitcode-api.readthedocs.io
10
+ Project-URL: Gitcode, https://gitcode.com/SushiNinja/GitCode-API
11
+ Project-URL: Github, https://github.com/Trenza1ore/GitCode-API
12
+ Project-URL: Homepage, https://hugohuang.com/gitcode-api
13
+ Project-URL: Author, https://hugohuang.com
14
14
  Keywords: gitcode,git,devops,api,sdk,python,httpx,client,mcp,agent,fastmcp,llm,openjiuwen,mcp client,mcp server,model context protocol
15
15
  Classifier: Development Status :: 4 - Beta
16
16
  Classifier: Programming Language :: Python
@@ -37,7 +37,7 @@ Dynamic: license-file
37
37
 
38
38
  # GitCode-API
39
39
 
40
- [![PyPI - Version](https://img.shields.io/pypi/v/gitcode-api?link=https%3A%2F%2Fpypi.org%2Fproject%2Fgitcode-api%2F&uuid=0c863acb12c7438c96f44568f4d808ce)](https://pypi.org/project/gitcode-api) [![PyPI Downloads](https://static.pepy.tech/personalized-badge/gitcode-api?period=total&units=INTERNATIONAL_SYSTEM&left_color=GRAY&right_color=RED&left_text=downloads&uuid=161cdcabfd404203848318e830b96b41)](https://pepy.tech/projects/gitcode-api) [![CodeFactor](https://www.codefactor.io/repository/github/trenza1ore/gitcode-api/badge)](https://www.codefactor.io/repository/github/trenza1ore/gitcode-api)
40
+ [![PyPI - Version](https://img.shields.io/pypi/v/gitcode-api?link=https%3A%2F%2Fpypi.org%2Fproject%2Fgitcode-api%2F&uuid=a97d86566eb14d5e96f3f90dafdd0beb)](https://pypi.org/project/gitcode-api) [![PyPI Downloads](https://static.pepy.tech/personalized-badge/gitcode-api?period=total&units=INTERNATIONAL_SYSTEM&left_color=GRAY&right_color=RED&left_text=downloads&uuid=a97d86566eb14d5e96f3f90dafdd0beb)](https://pepy.tech/projects/gitcode-api) [![CodeFactor](https://www.codefactor.io/repository/github/trenza1ore/gitcode-api/badge)](https://www.codefactor.io/repository/github/trenza1ore/gitcode-api)
41
41
  [![Install in Cursor](https://img.shields.io/badge/Install_in-Cursor-000000?logoColor=white)](https://cursor.com/en/install-mcp?name=GitCode%20API&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJnaXRjb2RlLWFwaVttY3BdIiwiZ2l0Y29kZS1hcGkiLCJzZXJ2ZSJdLCJlbnYiOnsiR0lUQ09ERV9BQ0NFU1NfVE9LRU4iOiIke2lucHV0OmdpdGNvZGVfYWNjZXNzX3Rva2VufSJ9LCJpbnB1dHMiOlt7ImlkIjoiZ2l0Y29kZV9hY2Nlc3NfdG9rZW4iLCJ0eXBlIjoicHJvbXB0U3RyaW5nIiwiZGVzY3JpcHRpb24iOiJFbnRlciBHSVRDT0RFX0FDQ0VTU19UT0tFTiIsInBhc3N3b3JkIjp0cnVlfV19) [![Install in VS Code](https://img.shields.io/badge/Install_in-VS_Code-0098FF?logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=GitCode%20API&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22--from%22%2C%22gitcode-api%5Bmcp%5D%22%2C%22gitcode-api%22%2C%22serve%22%5D%2C%22env%22%3A%7B%22GITCODE_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitcode_access_token%7D%22%7D%2C%22inputs%22%3A%5B%7B%22id%22%3A%22gitcode_access_token%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Enter%20GITCODE_ACCESS_TOKEN%22%2C%22password%22%3Atrue%7D%5D%7D)
42
42
  [![GitHub Badge](https://img.shields.io/badge/github-repo-blue?logo=github&link=https%3A%2F%2Fgithub.com%2FTrenza1ore%2FGitCode-API)](https://github.com/Trenza1ore/GitCode-API) [![GitCode Badge](https://img.shields.io/badge/gitcode-repo-brown?logo=gitcode&link=https%3A%2F%2Fgitcode.com%2FSushiNinja%2FGitCode-API)](https://gitcode.com/SushiNinja/GitCode-API)
43
43
 
@@ -1,6 +1,6 @@
1
1
  # GitCode-API
2
2
 
3
- [![PyPI - Version](https://img.shields.io/pypi/v/gitcode-api?link=https%3A%2F%2Fpypi.org%2Fproject%2Fgitcode-api%2F&uuid=0c863acb12c7438c96f44568f4d808ce)](https://pypi.org/project/gitcode-api) [![PyPI Downloads](https://static.pepy.tech/personalized-badge/gitcode-api?period=total&units=INTERNATIONAL_SYSTEM&left_color=GRAY&right_color=RED&left_text=downloads&uuid=161cdcabfd404203848318e830b96b41)](https://pepy.tech/projects/gitcode-api) [![CodeFactor](https://www.codefactor.io/repository/github/trenza1ore/gitcode-api/badge)](https://www.codefactor.io/repository/github/trenza1ore/gitcode-api)
3
+ [![PyPI - Version](https://img.shields.io/pypi/v/gitcode-api?link=https%3A%2F%2Fpypi.org%2Fproject%2Fgitcode-api%2F&uuid=a97d86566eb14d5e96f3f90dafdd0beb)](https://pypi.org/project/gitcode-api) [![PyPI Downloads](https://static.pepy.tech/personalized-badge/gitcode-api?period=total&units=INTERNATIONAL_SYSTEM&left_color=GRAY&right_color=RED&left_text=downloads&uuid=a97d86566eb14d5e96f3f90dafdd0beb)](https://pepy.tech/projects/gitcode-api) [![CodeFactor](https://www.codefactor.io/repository/github/trenza1ore/gitcode-api/badge)](https://www.codefactor.io/repository/github/trenza1ore/gitcode-api)
4
4
  [![Install in Cursor](https://img.shields.io/badge/Install_in-Cursor-000000?logoColor=white)](https://cursor.com/en/install-mcp?name=GitCode%20API&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJnaXRjb2RlLWFwaVttY3BdIiwiZ2l0Y29kZS1hcGkiLCJzZXJ2ZSJdLCJlbnYiOnsiR0lUQ09ERV9BQ0NFU1NfVE9LRU4iOiIke2lucHV0OmdpdGNvZGVfYWNjZXNzX3Rva2VufSJ9LCJpbnB1dHMiOlt7ImlkIjoiZ2l0Y29kZV9hY2Nlc3NfdG9rZW4iLCJ0eXBlIjoicHJvbXB0U3RyaW5nIiwiZGVzY3JpcHRpb24iOiJFbnRlciBHSVRDT0RFX0FDQ0VTU19UT0tFTiIsInBhc3N3b3JkIjp0cnVlfV19) [![Install in VS Code](https://img.shields.io/badge/Install_in-VS_Code-0098FF?logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=GitCode%20API&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22--from%22%2C%22gitcode-api%5Bmcp%5D%22%2C%22gitcode-api%22%2C%22serve%22%5D%2C%22env%22%3A%7B%22GITCODE_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitcode_access_token%7D%22%7D%2C%22inputs%22%3A%5B%7B%22id%22%3A%22gitcode_access_token%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Enter%20GITCODE_ACCESS_TOKEN%22%2C%22password%22%3Atrue%7D%5D%7D)
5
5
  [![GitHub Badge](https://img.shields.io/badge/github-repo-blue?logo=github&link=https%3A%2F%2Fgithub.com%2FTrenza1ore%2FGitCode-API)](https://github.com/Trenza1ore/GitCode-API) [![GitCode Badge](https://img.shields.io/badge/gitcode-repo-brown?logo=gitcode&link=https%3A%2F%2Fgitcode.com%2FSushiNinja%2FGitCode-API)](https://gitcode.com/SushiNinja/GitCode-API)
6
6
 
@@ -0,0 +1,55 @@
1
+ """Public package exports for the GitCode SDK."""
2
+
3
+ import re
4
+ from importlib.metadata import PackageNotFoundError, metadata, version
5
+ from typing import cast
6
+
7
+ from . import constants
8
+ from ._client import AsyncGitCode, GitCode
9
+ from ._exceptions import (
10
+ GitCodeAPIError,
11
+ GitCodeConfigurationError,
12
+ GitCodeError,
13
+ GitCodeHTTPStatusError,
14
+ )
15
+ from .utils import as_dict
16
+
17
+ _README_UUIDS = []
18
+ _VERSION_STR = "unknown"
19
+
20
+ try:
21
+ package_meta = metadata("gitcode_api")
22
+ package_desc = cast(str, package_meta.get("Description"))
23
+ _README_UUIDS = re.findall(r"\&uuid=(\w+)", package_desc, flags=re.ASCII)
24
+ _VERSION_STR = version("gitcode_api")
25
+ except PackageNotFoundError:
26
+ from pathlib import Path
27
+
28
+ import tomllib
29
+
30
+ pyproject_toml = Path(__file__).parent.parent / "pyproject.toml"
31
+ if pyproject_toml.exists():
32
+ _VERSION_STR = tomllib.loads(pyproject_toml.read_text(encoding="utf-8")).get("project", {}).get("version", "")
33
+ else:
34
+ version_file = Path(__file__).with_name("version.txt")
35
+ if version_file.exists():
36
+ _VERSION_STR = version_file.read_text(encoding="utf-8").strip()
37
+ read_me_file = pyproject_toml.with_name("README.md")
38
+ if read_me_file.exists():
39
+ _README_UUIDS = re.findall(r"\&uuid=(\w+)", read_me_file.read_text(encoding="utf-8").strip(), flags=re.ASCII)
40
+
41
+ __build_hash__ = _README_UUIDS[0] if _README_UUIDS else "unknown"
42
+ __version__ = _VERSION_STR.strip()
43
+
44
+ __all__ = [
45
+ "constants",
46
+ "__version__",
47
+ "__build_hash__",
48
+ "AsyncGitCode",
49
+ "GitCode",
50
+ "GitCodeAPIError",
51
+ "GitCodeConfigurationError",
52
+ "GitCodeError",
53
+ "GitCodeHTTPStatusError",
54
+ "as_dict",
55
+ ]
@@ -20,6 +20,11 @@ def _drop_none_values(mapping: Dict[str, Any]) -> Dict[str, Any]:
20
20
  return {key: value for key, value in mapping.items() if value is not None}
21
21
 
22
22
 
23
+ def _default_decrypt(value: Any) -> str:
24
+ """Dummy decryption function, basically a no-op."""
25
+ return value
26
+
27
+
23
28
  class BaseGitCodeClient:
24
29
  """Base configuration shared by synchronous and asynchronous clients.
25
30
 
@@ -42,19 +47,24 @@ class BaseGitCodeClient:
42
47
  decrypt: Optional[Callable] = None,
43
48
  ) -> None:
44
49
  """Store client configuration and resolve authentication."""
45
- self.api_key = self._resolve_api_key(api_key, decrypt)
50
+ self.decrypt = decrypt or _default_decrypt
51
+ self.api_key = self._resolve_api_key(api_key)
46
52
  self.owner = owner
47
53
  self.repo = repo
48
54
  self.base_url = base_url.rstrip("/")
49
55
  self.timeout = timeout if timeout is not None else DEFAULT_TIMEOUT
50
56
 
51
- def _resolve_api_key(self, api_key: Optional[str], decrypt: Optional[Callable] = None) -> str:
57
+ def _resolve_api_key(self, api_key: Optional[str]) -> str:
52
58
  """Resolve the access token from an argument or environment variable."""
53
59
  token = api_key or os.getenv(DEFAULT_TOKEN_ENV)
54
- if callable(decrypt):
55
- token = decrypt(token)
56
60
  if not token:
57
61
  raise GitCodeConfigurationError("No API key provided. Pass api_key=... or set GITCODE_ACCESS_TOKEN.")
62
+ try:
63
+ token_decrypt = self.decrypt(str(token))
64
+ if not isinstance(token_decrypt, str):
65
+ raise TypeError(f"Decrypted token has type={type(token_decrypt)} instead of str: {token_decrypt}")
66
+ except Exception as e:
67
+ raise GitCodeConfigurationError("Invalid decrypt function, check its correctness.") from e
58
68
  return str(token)
59
69
 
60
70
  def _resolve_repo_context(
@@ -75,7 +85,7 @@ class BaseGitCodeClient:
75
85
  """Build request headers for authenticated JSON API calls."""
76
86
  headers = {
77
87
  "Accept": "application/json",
78
- "Authorization": f"Bearer {self.api_key}",
88
+ "Authorization": f"Bearer {self.decrypt(self.api_key)}",
79
89
  }
80
90
  if extra_headers:
81
91
  headers.update(extra_headers)
@@ -0,0 +1,25 @@
1
+ """Shared constant values for the GitCode SDK."""
2
+
3
+ import re
4
+
5
+ DEFAULT_BASE_URL = "https://api.gitcode.com/api/v5"
6
+ DEFAULT_TIMEOUT = 30.0
7
+ DEFAULT_TOKEN_ENV = "GITCODE_ACCESS_TOKEN"
8
+ DEFAULT_CA_ENV = "GITCODE_CA_BUNDLE"
9
+ GITCODE_ISSUE_TEMPLATE_PATH_RE: re.Pattern[str] = re.compile(
10
+ r"\.git(code|hub)/ISSUE_TEMPLATE.*\.(md|markdown|ya?ml)$", re.IGNORECASE
11
+ )
12
+ GITCODE_PULL_REQUEST_TEMPLATE_PATH_RE: re.Pattern[str] = re.compile(
13
+ r"\.git(code|hub)/PULL_REQUEST_TEMPLATE.*\.(md|markdown|ya?ml)$", re.IGNORECASE
14
+ )
15
+ GITCODE_TEMPLATE_REPO = ".gitcode"
16
+
17
+ __all__ = [
18
+ "DEFAULT_BASE_URL",
19
+ "DEFAULT_TIMEOUT",
20
+ "DEFAULT_TOKEN_ENV",
21
+ "DEFAULT_CA_ENV",
22
+ "GITCODE_ISSUE_TEMPLATE_PATH_RE",
23
+ "GITCODE_PULL_REQUEST_TEMPLATE_PATH_RE",
24
+ "GITCODE_TEMPLATE_REPO",
25
+ ]
File without changes
@@ -1,19 +1,12 @@
1
1
  """Shared resource base classes for the GitCode SDK."""
2
2
 
3
- import re
4
3
  from typing import Any, Dict, List, Optional, Pattern, Tuple, Union
5
4
 
6
5
  from .._base_client import AsyncAPIClient, SyncAPIClient
7
6
  from .._base_resource import BaseResource
8
7
  from .._exceptions import GitCodeHTTPStatusError
9
8
  from .._models import APIObject, ModelT, as_model, as_model_list
10
-
11
- GITCODE_ISSUE_TEMPLATE_PATH_RE: Pattern[str] = re.compile(
12
- r"\.gitcode/ISSUE_TEMPLATE.*\.(md|markdown|ya?ml)$", re.IGNORECASE
13
- )
14
- GITCODE_PULL_REQUEST_TEMPLATE_PATH_RE: Pattern[str] = re.compile(
15
- r"\.gitcode/PULL_REQUEST_TEMPLATE.*\.(md|markdown|ya?ml)$", re.IGNORECASE
16
- )
9
+ from ..constants import GITCODE_TEMPLATE_REPO
17
10
 
18
11
 
19
12
  def _parse_parent_owner_repo(repo_obj: Any) -> Optional[Tuple[str, str]]:
@@ -50,7 +43,7 @@ def _resolution_sources_sync(client: SyncAPIClient, owner: str, repo: str) -> Li
50
43
  sources.append(pair)
51
44
 
52
45
  add((owner, repo))
53
- add((owner, ".gitcode"))
46
+ add((owner, GITCODE_TEMPLATE_REPO))
54
47
 
55
48
  max_candidates = 64
56
49
  index = 0
@@ -68,7 +61,7 @@ def _resolution_sources_sync(client: SyncAPIClient, owner: str, repo: str) -> Li
68
61
  continue
69
62
  po, pr = parsed
70
63
  add((po, pr))
71
- add((po, ".gitcode"))
64
+ add((po, GITCODE_TEMPLATE_REPO))
72
65
 
73
66
  return sources
74
67
 
@@ -86,7 +79,7 @@ async def _resolution_sources_async(client: AsyncAPIClient, owner: str, repo: st
86
79
  sources.append(pair)
87
80
 
88
81
  add((owner, repo))
89
- add((owner, ".gitcode"))
82
+ add((owner, GITCODE_TEMPLATE_REPO))
90
83
 
91
84
  max_candidates = 64
92
85
  index = 0
@@ -104,7 +97,7 @@ async def _resolution_sources_async(client: AsyncAPIClient, owner: str, repo: st
104
97
  continue
105
98
  po, pr = parsed
106
99
  add((po, pr))
107
- add((po, ".gitcode"))
100
+ add((po, GITCODE_TEMPLATE_REPO))
108
101
 
109
102
  return sources
110
103
 
@@ -210,6 +203,8 @@ def list_gitcode_template_rows_sync(
210
203
  acc: List[Tuple[str, str, str, str]] = []
211
204
  try:
212
205
  _walk_dot_gitcode_contents_sync(client, so, sr, ".gitcode", acc)
206
+ if sr != GITCODE_TEMPLATE_REPO:
207
+ _walk_dot_gitcode_contents_sync(client, so, sr, ".github", acc)
213
208
  except GitCodeHTTPStatusError:
214
209
  continue
215
210
  rows = [(t_o, t_r, p, s) for t_o, t_r, p, s in acc if path_pattern.match(p)]
@@ -228,6 +223,8 @@ async def list_gitcode_template_rows_async(
228
223
  acc: List[Tuple[str, str, str, str]] = []
229
224
  try:
230
225
  await _walk_dot_gitcode_contents_async(client, so, sr, ".gitcode", acc)
226
+ if sr != GITCODE_TEMPLATE_REPO:
227
+ await _walk_dot_gitcode_contents_async(client, so, sr, ".github", acc)
231
228
  except GitCodeHTTPStatusError:
232
229
  continue
233
230
  rows = [(t_o, t_r, p, s) for t_o, t_r, p, s in acc if path_pattern.match(p)]
@@ -25,9 +25,8 @@ from .._models import (
25
25
  UserSummary,
26
26
  as_model,
27
27
  )
28
+ from ..constants import GITCODE_ISSUE_TEMPLATE_PATH_RE, GITCODE_PULL_REQUEST_TEMPLATE_PATH_RE
28
29
  from ._shared import (
29
- GITCODE_ISSUE_TEMPLATE_PATH_RE,
30
- GITCODE_PULL_REQUEST_TEMPLATE_PATH_RE,
31
30
  AsyncResource,
32
31
  SyncResource,
33
32
  get_gitcode_template_body_async,
@@ -420,6 +419,8 @@ class IssuesResource(SyncResource):
420
419
  are appended, deduplicated, and visited in order). The first source with matching
421
420
  templates wins.
422
421
 
422
+ Version 1.2.19: Now also supporting GitHub-mirrored repos with a ``.github/`` folder.
423
+
423
424
  :param owner: Repository owner path. Uses the client default when omitted.
424
425
  :param repo: Repository name. Uses the client default when omitted.
425
426
  :returns: Template metadata entries (paths and SHAs); empty when none match.
@@ -1067,6 +1068,8 @@ class PullsResource(SyncResource):
1067
1068
  are appended, deduplicated, and visited in order). The first source with matching
1068
1069
  templates wins.
1069
1070
 
1071
+ Version 1.2.19: Now also supporting GitHub-mirrored repos with a ``.github/`` folder.
1072
+
1070
1073
  :param owner: Repository owner path. Uses the client default when omitted.
1071
1074
  :param repo: Repository path. Uses the client default when omitted.
1072
1075
  :returns: Template metadata entries (paths and SHAs); empty when none match.
@@ -1734,6 +1737,8 @@ class AsyncIssuesResource(AsyncResource):
1734
1737
  are appended, deduplicated, and visited in order). The first source with matching
1735
1738
  templates wins.
1736
1739
 
1740
+ Version 1.2.19: Now also supporting GitHub-mirrored repos with a ``.github/`` folder.
1741
+
1737
1742
  :param owner: Repository owner path. Uses the client default when omitted.
1738
1743
  :param repo: Repository name. Uses the client default when omitted.
1739
1744
  :returns: Template metadata entries (paths and SHAs); empty when none match.
@@ -2328,6 +2333,8 @@ class AsyncPullsResource(AsyncResource):
2328
2333
  are appended, deduplicated, and visited in order). The first source with matching
2329
2334
  templates wins.
2330
2335
 
2336
+ Version 1.2.19: Now also supporting GitHub-mirrored repos with a ``.github/`` folder.
2337
+
2331
2338
  :param owner: Repository owner path. Uses the client default when omitted.
2332
2339
  :param repo: Repository path. Uses the client default when omitted.
2333
2340
  :returns: Template metadata entries (paths and SHAs); empty when none match.
@@ -0,0 +1 @@
1
+ 1.2.19
@@ -1,16 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitcode-api
3
- Version: 1.2.17
3
+ Version: 1.2.19
4
4
  Summary: Easy to use Python SDK for the GitCode REST API. Providing builtin CLI tool, and optional LLM integration (MCP, OpenAI tool, and openJiuwen tool) for agents. Community-maintained.
5
5
  Author-email: Hugo Huang <hugo@hugohuang.com>
6
6
  License-Expression: MIT
7
- Project-URL: changelog, https://gitcode-api.readthedocs.io/en/latest/changelog.html
8
- Project-URL: issues, https://github.com/Trenza1ore/GitCode-API/issues
9
- Project-URL: documentation, https://gitcode-api.readthedocs.io
10
- Project-URL: gitcode, https://gitcode.com/SushiNinja/GitCode-API
11
- Project-URL: github, https://github.com/Trenza1ore/GitCode-API
12
- Project-URL: homepage, https://hugohuang.com/gitcode-api
13
- Project-URL: author, https://hugohuang.com
7
+ Project-URL: Changelog, https://gitcode-api.readthedocs.io/en/latest/changelog.html
8
+ Project-URL: Issues, https://github.com/Trenza1ore/GitCode-API/issues
9
+ Project-URL: Documentation, https://gitcode-api.readthedocs.io
10
+ Project-URL: Gitcode, https://gitcode.com/SushiNinja/GitCode-API
11
+ Project-URL: Github, https://github.com/Trenza1ore/GitCode-API
12
+ Project-URL: Homepage, https://hugohuang.com/gitcode-api
13
+ Project-URL: Author, https://hugohuang.com
14
14
  Keywords: gitcode,git,devops,api,sdk,python,httpx,client,mcp,agent,fastmcp,llm,openjiuwen,mcp client,mcp server,model context protocol
15
15
  Classifier: Development Status :: 4 - Beta
16
16
  Classifier: Programming Language :: Python
@@ -37,7 +37,7 @@ Dynamic: license-file
37
37
 
38
38
  # GitCode-API
39
39
 
40
- [![PyPI - Version](https://img.shields.io/pypi/v/gitcode-api?link=https%3A%2F%2Fpypi.org%2Fproject%2Fgitcode-api%2F&uuid=0c863acb12c7438c96f44568f4d808ce)](https://pypi.org/project/gitcode-api) [![PyPI Downloads](https://static.pepy.tech/personalized-badge/gitcode-api?period=total&units=INTERNATIONAL_SYSTEM&left_color=GRAY&right_color=RED&left_text=downloads&uuid=161cdcabfd404203848318e830b96b41)](https://pepy.tech/projects/gitcode-api) [![CodeFactor](https://www.codefactor.io/repository/github/trenza1ore/gitcode-api/badge)](https://www.codefactor.io/repository/github/trenza1ore/gitcode-api)
40
+ [![PyPI - Version](https://img.shields.io/pypi/v/gitcode-api?link=https%3A%2F%2Fpypi.org%2Fproject%2Fgitcode-api%2F&uuid=a97d86566eb14d5e96f3f90dafdd0beb)](https://pypi.org/project/gitcode-api) [![PyPI Downloads](https://static.pepy.tech/personalized-badge/gitcode-api?period=total&units=INTERNATIONAL_SYSTEM&left_color=GRAY&right_color=RED&left_text=downloads&uuid=a97d86566eb14d5e96f3f90dafdd0beb)](https://pepy.tech/projects/gitcode-api) [![CodeFactor](https://www.codefactor.io/repository/github/trenza1ore/gitcode-api/badge)](https://www.codefactor.io/repository/github/trenza1ore/gitcode-api)
41
41
  [![Install in Cursor](https://img.shields.io/badge/Install_in-Cursor-000000?logoColor=white)](https://cursor.com/en/install-mcp?name=GitCode%20API&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJnaXRjb2RlLWFwaVttY3BdIiwiZ2l0Y29kZS1hcGkiLCJzZXJ2ZSJdLCJlbnYiOnsiR0lUQ09ERV9BQ0NFU1NfVE9LRU4iOiIke2lucHV0OmdpdGNvZGVfYWNjZXNzX3Rva2VufSJ9LCJpbnB1dHMiOlt7ImlkIjoiZ2l0Y29kZV9hY2Nlc3NfdG9rZW4iLCJ0eXBlIjoicHJvbXB0U3RyaW5nIiwiZGVzY3JpcHRpb24iOiJFbnRlciBHSVRDT0RFX0FDQ0VTU19UT0tFTiIsInBhc3N3b3JkIjp0cnVlfV19) [![Install in VS Code](https://img.shields.io/badge/Install_in-VS_Code-0098FF?logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=GitCode%20API&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22--from%22%2C%22gitcode-api%5Bmcp%5D%22%2C%22gitcode-api%22%2C%22serve%22%5D%2C%22env%22%3A%7B%22GITCODE_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitcode_access_token%7D%22%7D%2C%22inputs%22%3A%5B%7B%22id%22%3A%22gitcode_access_token%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Enter%20GITCODE_ACCESS_TOKEN%22%2C%22password%22%3Atrue%7D%5D%7D)
42
42
  [![GitHub Badge](https://img.shields.io/badge/github-repo-blue?logo=github&link=https%3A%2F%2Fgithub.com%2FTrenza1ore%2FGitCode-API)](https://github.com/Trenza1ore/GitCode-API) [![GitCode Badge](https://img.shields.io/badge/gitcode-repo-brown?logo=gitcode&link=https%3A%2F%2Fgitcode.com%2FSushiNinja%2FGitCode-API)](https://gitcode.com/SushiNinja/GitCode-API)
43
43
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gitcode-api"
3
- version = "1.2.17"
3
+ version = "1.2.19"
4
4
  description = "Easy to use Python SDK for the GitCode REST API. Providing builtin CLI tool, and optional LLM integration (MCP, OpenAI tool, and openJiuwen tool) for agents. Community-maintained."
5
5
  keywords = [
6
6
  "gitcode", "git", "devops", "api", "sdk", "python", "httpx", "client",
@@ -79,13 +79,13 @@ dev = [
79
79
  ]
80
80
 
81
81
  [project.urls]
82
- changelog = "https://gitcode-api.readthedocs.io/en/latest/changelog.html"
83
- issues = "https://github.com/Trenza1ore/GitCode-API/issues"
84
- documentation = "https://gitcode-api.readthedocs.io"
85
- gitcode = "https://gitcode.com/SushiNinja/GitCode-API"
86
- github = "https://github.com/Trenza1ore/GitCode-API"
87
- homepage = "https://hugohuang.com/gitcode-api"
88
- author = "https://hugohuang.com"
82
+ Changelog = "https://gitcode-api.readthedocs.io/en/latest/changelog.html"
83
+ Issues = "https://github.com/Trenza1ore/GitCode-API/issues"
84
+ Documentation = "https://gitcode-api.readthedocs.io"
85
+ Gitcode = "https://gitcode.com/SushiNinja/GitCode-API"
86
+ Github = "https://github.com/Trenza1ore/GitCode-API"
87
+ Homepage = "https://hugohuang.com/gitcode-api"
88
+ Author = "https://hugohuang.com"
89
89
 
90
90
  [project.scripts]
91
91
  gitcode-api = "gitcode_api.cli:main"
@@ -94,7 +94,7 @@ gitcode-api = "gitcode_api.cli:main"
94
94
  default-groups = ['dev']
95
95
 
96
96
  [tool.setuptools.package-data]
97
- gitcode_api = ["**/version.txt", "**/py.typed"]
97
+ gitcode_api = ["version.txt", "py.typed"]
98
98
 
99
99
  [tool.coverage.run]
100
100
  omit = ["tests/*"]
@@ -4,8 +4,6 @@ import importlib.util
4
4
  import json
5
5
  from pathlib import Path
6
6
 
7
- import pytest
8
-
9
7
  ROOT = Path(__file__).resolve().parents[1]
10
8
  _BUILD_MANIFEST_PATH = ROOT / "scripts" / "build_manifest.py"
11
9
  _spec = importlib.util.spec_from_file_location("build_manifest", _BUILD_MANIFEST_PATH)
@@ -24,11 +22,11 @@ license = "MIT"
24
22
  authors = [{ name = "Alice Example", email = "alice@example.com" }]
25
23
 
26
24
  [project.urls]
27
- homepage = "https://example.com/home"
28
- documentation = "https://example.com/docs"
29
- github = "https://github.com/org/demo"
30
- author = "https://example.com/~alice"
31
- issues = "https://github.com/org/demo/issues"
25
+ Homepage = "https://example.com/home"
26
+ Documentation = "https://example.com/docs"
27
+ Github = "https://github.com/org/demo"
28
+ Author = "https://example.com/~alice"
29
+ Issues = "https://github.com/org/demo/issues"
32
30
  """
33
31
 
34
32
  MINIMAL_TEMPLATE = {
@@ -75,20 +73,3 @@ def test_write_manifest_ensure_ascii_utf8(tmp_path: Path) -> None:
75
73
  text = out.read_text(encoding="utf-8")
76
74
  assert "café" in text
77
75
  assert text.endswith("\n")
78
-
79
-
80
- def test_missing_github_raises(tmp_path: Path) -> None:
81
- bad = b"""\
82
- [project]
83
- name = "x"
84
- version = "1"
85
- description = "d"
86
- authors = [{ name = "A", email = "a@b.c" }]
87
- """
88
- pyproject_path = tmp_path / "pyproject.toml"
89
- pyproject_path.write_bytes(bad)
90
- template_path = tmp_path / "manifest.in.json"
91
- template_path.write_text(json.dumps(MINIMAL_TEMPLATE), encoding="utf-8")
92
-
93
- with pytest.raises(ValueError, match="github"):
94
- _build_manifest.build_manifest_dict(pyproject_path, template_path)
@@ -1,4 +1,4 @@
1
- """Tests for issue/PR ``.gitcode`` template resolution helpers."""
1
+ """Tests for issue/PR ``.gitcode`` and ``.github`` template resolution helpers."""
2
2
 
3
3
  from typing import Optional
4
4
 
@@ -6,6 +6,10 @@ import httpx
6
6
  import pytest
7
7
 
8
8
  from gitcode_api._exceptions import GitCodeHTTPStatusError
9
+ from gitcode_api.constants import (
10
+ GITCODE_ISSUE_TEMPLATE_PATH_RE,
11
+ GITCODE_PULL_REQUEST_TEMPLATE_PATH_RE,
12
+ )
9
13
 
10
14
  # ``_resolution_sources_*`` probes ``GET /repos/{owner}/{repo}`` for every candidate; stub these.
11
15
  _REPO_METADATA_NONFORK_PATHS = frozenset(
@@ -29,12 +33,22 @@ def _repo_metadata_nonfork_stub(request: httpx.Request, path: str) -> Optional[h
29
33
  return None
30
34
 
31
35
 
36
+ def _empty_github_contents_stub(request: httpx.Request, path: str) -> Optional[httpx.Response]:
37
+ """Stub ``GET .../contents/.github`` from mirrored-repo template walks."""
38
+ if request.method == "GET" and path.endswith("/contents/.github"):
39
+ return httpx.Response(404, json={"message": "missing"})
40
+ return None
41
+
42
+
32
43
  def test_list_templates_fallback_to_dot_gitcode_repo(sync_client_factory):
33
44
  def handler(request: httpx.Request) -> httpx.Response:
34
45
  p = request.url.path
35
46
  stub = _repo_metadata_nonfork_stub(request, p)
36
47
  if stub is not None:
37
48
  return stub
49
+ gh = _empty_github_contents_stub(request, p)
50
+ if gh is not None:
51
+ return gh
38
52
  if p == "/api/v5/repos/acme/proj" and request.method == "GET":
39
53
  return httpx.Response(200, json={"fork": False, "id": 1})
40
54
  if p == "/api/v5/repos/acme/proj/contents/.gitcode":
@@ -68,6 +82,9 @@ def test_list_templates_fork_parent_source(sync_client_factory):
68
82
  stub = _repo_metadata_nonfork_stub(request, p)
69
83
  if stub is not None:
70
84
  return stub
85
+ gh = _empty_github_contents_stub(request, p)
86
+ if gh is not None:
87
+ return gh
71
88
  if p == "/api/v5/repos/acme/proj" and request.method == "GET":
72
89
  return httpx.Response(
73
90
  200,
@@ -111,6 +128,9 @@ def test_list_templates_fork_parent_dot_gitcode_repo(sync_client_factory):
111
128
  stub = _repo_metadata_nonfork_stub(request, p)
112
129
  if stub is not None:
113
130
  return stub
131
+ gh = _empty_github_contents_stub(request, p)
132
+ if gh is not None:
133
+ return gh
114
134
  if p == "/api/v5/repos/acme/proj" and request.method == "GET":
115
135
  return httpx.Response(
116
136
  200,
@@ -153,6 +173,9 @@ def test_list_templates_includes_yaml_issue_forms(sync_client_factory):
153
173
  stub = _repo_metadata_nonfork_stub(request, p)
154
174
  if stub is not None:
155
175
  return stub
176
+ gh = _empty_github_contents_stub(request, p)
177
+ if gh is not None:
178
+ return gh
156
179
  if p == "/api/v5/repos/acme/proj" and request.method == "GET":
157
180
  return httpx.Response(200, json={"fork": False})
158
181
  if p == "/api/v5/repos/acme/proj/contents/.gitcode":
@@ -224,6 +247,9 @@ def test_pulls_list_and_get_template(sync_client_factory):
224
247
  stub = _repo_metadata_nonfork_stub(request, p)
225
248
  if stub is not None:
226
249
  return stub
250
+ gh = _empty_github_contents_stub(request, p)
251
+ if gh is not None:
252
+ return gh
227
253
  if p == "/api/v5/repos/o/r" and request.method == "GET" and "contents" not in p and "raw" not in p:
228
254
  return httpx.Response(200, json={"fork": False})
229
255
  if p == "/api/v5/repos/o/r/contents/.gitcode":
@@ -257,6 +283,9 @@ async def test_async_issues_list_templates(async_client_factory):
257
283
  stub = _repo_metadata_nonfork_stub(request, p)
258
284
  if stub is not None:
259
285
  return stub
286
+ gh = _empty_github_contents_stub(request, p)
287
+ if gh is not None:
288
+ return gh
260
289
  if p == "/api/v5/repos/acme/proj" and request.method == "GET":
261
290
  return httpx.Response(200, json={"fork": False})
262
291
  if p == "/api/v5/repos/acme/proj/contents/.gitcode":
@@ -280,3 +309,63 @@ async def test_async_issues_list_templates(async_client_factory):
280
309
  await http.aclose()
281
310
  assert len(items) == 1
282
311
  assert items[0].sha == "asyncsha"
312
+
313
+
314
+ def test_template_path_patterns_accept_github_paths():
315
+ assert GITCODE_ISSUE_TEMPLATE_PATH_RE.match(".github/ISSUE_TEMPLATE/bug.md")
316
+ assert GITCODE_ISSUE_TEMPLATE_PATH_RE.match(".gitcode/ISSUE_TEMPLATE_bug.yml")
317
+ assert not GITCODE_ISSUE_TEMPLATE_PATH_RE.match(".github/README.md")
318
+ assert GITCODE_PULL_REQUEST_TEMPLATE_PATH_RE.match(".github/PULL_REQUEST_TEMPLATE.md")
319
+
320
+
321
+ def test_list_templates_from_dot_github(sync_client_factory):
322
+ def handler(request: httpx.Request) -> httpx.Response:
323
+ p = request.url.path
324
+ stub = _repo_metadata_nonfork_stub(request, p)
325
+ if stub is not None:
326
+ return stub
327
+ if p == "/api/v5/repos/acme/proj" and request.method == "GET":
328
+ return httpx.Response(200, json={"fork": False})
329
+ if p == "/api/v5/repos/acme/proj/contents/.gitcode":
330
+ return httpx.Response(404, json={"message": "missing"})
331
+ if p == "/api/v5/repos/acme/proj/contents/.github":
332
+ return httpx.Response(
333
+ 200,
334
+ json=[
335
+ {
336
+ "type": "file",
337
+ "path": ".github/ISSUE_TEMPLATE/bug_report.md",
338
+ "sha": "ghsha",
339
+ }
340
+ ],
341
+ )
342
+ if p == "/api/v5/repos/acme/.gitcode/contents/.gitcode":
343
+ return httpx.Response(404, json={"message": "missing"})
344
+ raise AssertionError(f"unexpected {request.method} {p}")
345
+
346
+ client, _ = sync_client_factory(handler, owner="acme", repo="proj")
347
+ items = client.issues.list_templates()
348
+ assert len(items) == 1
349
+ assert items[0].path == ".github/ISSUE_TEMPLATE/bug_report.md"
350
+ assert items[0].sha == "ghsha"
351
+ assert items[0].template_owner == "acme"
352
+ assert items[0].template_repo == "proj"
353
+
354
+
355
+ def test_get_template_from_dot_github_path(sync_client_factory):
356
+ path = ".github/PULL_REQUEST_TEMPLATE/default.md"
357
+
358
+ def handler(request: httpx.Request) -> httpx.Response:
359
+ p = request.url.path
360
+ stub = _repo_metadata_nonfork_stub(request, p)
361
+ if stub is not None:
362
+ return stub
363
+ if p == "/api/v5/repos/acme/proj" and request.method == "GET" and "contents" not in p and "raw" not in p:
364
+ return httpx.Response(200, json={"fork": False})
365
+ if p == f"/api/v5/repos/acme/proj/raw/{path}":
366
+ return httpx.Response(200, content=b"github pr body")
367
+ raise AssertionError(f"unexpected {request.method} {p}")
368
+
369
+ client, _ = sync_client_factory(handler, owner="acme", repo="proj")
370
+ text = client.pulls.get_template(path=path)
371
+ assert text == "github pr body"
@@ -71,7 +71,7 @@ def test_releases_create_posts_documented_payload_and_models_assets(sync_client_
71
71
  client, http_client = sync_client_factory(handler, owner="SushiNinja", repo="GitCode-API")
72
72
  try:
73
73
  release = client.releases.create(
74
- tag_name="v1.0.0",
74
+ tag="v1.0.0",
75
75
  name="v1.0.0",
76
76
  body="Release notes",
77
77
  target_commitish="main",
@@ -1,34 +0,0 @@
1
- """Public package exports for the GitCode SDK."""
2
-
3
- import re
4
- from importlib.metadata import metadata
5
- from typing import cast
6
-
7
- from . import constants
8
- from ._client import AsyncGitCode, GitCode
9
- from ._exceptions import (
10
- GitCodeAPIError,
11
- GitCodeConfigurationError,
12
- GitCodeError,
13
- GitCodeHTTPStatusError,
14
- )
15
- from .utils import as_dict
16
-
17
- package_meta = metadata("gitcode_api")
18
- package_desc = cast(str, package_meta.get("Description"))
19
- readme_uuids = re.findall(r"\&uuid=(\w+)", package_desc, flags=re.ASCII)
20
- __build_hash__ = readme_uuids[0] if readme_uuids else "unknown"
21
- __version__ = cast(str, package_meta.get("Version")).strip()
22
-
23
- __all__ = [
24
- "constants",
25
- "__version__",
26
- "__build_hash__",
27
- "AsyncGitCode",
28
- "GitCode",
29
- "GitCodeAPIError",
30
- "GitCodeConfigurationError",
31
- "GitCodeError",
32
- "GitCodeHTTPStatusError",
33
- "as_dict",
34
- ]
@@ -1,8 +0,0 @@
1
- """Shared constant values for the GitCode SDK."""
2
-
3
- DEFAULT_BASE_URL = "https://api.gitcode.com/api/v5"
4
- DEFAULT_TIMEOUT = 30.0
5
- DEFAULT_TOKEN_ENV = "GITCODE_ACCESS_TOKEN"
6
- DEFAULT_CA_ENV = "GITCODE_CA_BUNDLE"
7
-
8
- __all__ = ["DEFAULT_BASE_URL", "DEFAULT_TIMEOUT", "DEFAULT_TOKEN_ENV", "DEFAULT_CA_ENV"]
@@ -1 +0,0 @@
1
- partial
@@ -1 +0,0 @@
1
- 1.2.17
File without changes
File without changes