ghapi 2.0.7__tar.gz → 2.1.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.
- {ghapi-2.0.7/ghapi.egg-info → ghapi-2.1.0}/PKG-INFO +2 -2
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi/__init__.py +1 -1
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi/core.py +2 -2
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi/skill.py +1 -1
- {ghapi-2.0.7 → ghapi-2.1.0/ghapi.egg-info}/PKG-INFO +2 -2
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi.egg-info/requires.txt +1 -1
- {ghapi-2.0.7 → ghapi-2.1.0}/pyproject.toml +1 -1
- {ghapi-2.0.7 → ghapi-2.1.0}/CONTRIBUTING.md +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/LICENSE +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/MANIFEST.in +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/README.md +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi/_modidx.py +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi/actions.py +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi/all.py +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi/auth.py +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi/build_lib.py +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi/cli.py +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi/event.py +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi/gh_spec.py +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi/gql_spec.py +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi/graphql.py +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi/page.py +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi/py.typed +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi/templates.py +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi.egg-info/SOURCES.txt +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi.egg-info/dependency_links.txt +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi.egg-info/entry_points.txt +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/ghapi.egg-info/top_level.txt +0 -0
- {ghapi-2.0.7 → ghapi-2.1.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ghapi
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: A python client for the GitHub API
|
|
5
5
|
Author-email: Jeremy Howard <info@fast.ai>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -16,7 +16,7 @@ Requires-Python: >=3.10
|
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Requires-Dist: fastcore>=2.2.6
|
|
19
|
-
Requires-Dist: fastspec>=0.
|
|
19
|
+
Requires-Dist: fastspec>=0.2.0
|
|
20
20
|
Requires-Dist: tomli; python_version < "3.11"
|
|
21
21
|
Provides-Extra: dev
|
|
22
22
|
Requires-Dist: fastgit; extra == "dev"
|
|
@@ -5,4 +5,4 @@ Modules:
|
|
|
5
5
|
- `ghapi.graphql`: Query GitHub's GraphQL API: schema-aware chained queries, one-request batching, and raw GraphQL
|
|
6
6
|
- `ghapi.skill`: GitHub REST API access via `GhApi`, plus local git operations via `fastgit.Git`. Use this for day-to-day GitHub work: reading/creating issues and PRs, checking CI status, managing releases/branches/gists, and repo-local git operations -- all from Python, no shelling out to `gh`/`git` needed."""
|
|
7
7
|
|
|
8
|
-
__version__ = "2.0
|
|
8
|
+
__version__ = "2.1.0"
|
|
@@ -427,13 +427,13 @@ async def read_issue(self:GhApi, issue_number:int):
|
|
|
427
427
|
res = dict(title=iss.title, body=iss.body or '', is_pr=pr is not None, # chkstyle: ignore-node
|
|
428
428
|
comments=await self.issues.list_comments(issue_number))
|
|
429
429
|
if pr is not None:
|
|
430
|
-
res['diff'] = await self.pulls.get(issue_number,
|
|
430
|
+
res['diff'] = await self.pulls.get(issue_number, headers_={'Accept': 'application/vnd.github.v3.diff'})
|
|
431
431
|
res['review_comments'] = await self.pulls.list_review_comments(issue_number)
|
|
432
432
|
res['reviews'] = await self.pulls.list_reviews(issue_number)
|
|
433
433
|
else:
|
|
434
434
|
evts = await self.issues.list_events(issue_number)
|
|
435
435
|
sha = first(e.commit_id for e in evts if e.commit_id)
|
|
436
|
-
if sha: res['diff'] = await self.repos.get_commit(sha,
|
|
436
|
+
if sha: res['diff'] = await self.repos.get_commit(sha, headers_={'Accept': 'application/vnd.github.v3.diff'})
|
|
437
437
|
return _IssueInfo(dict2obj(res))
|
|
438
438
|
|
|
439
439
|
# %% ../nbs/00_core.ipynb #ccf9d458
|
|
@@ -91,7 +91,7 @@ Once the PR exists, the fork branch is the source of truth, and the local clone
|
|
|
91
91
|
- Rate limits: register `limit_cb` on `GhApi(...)` to get called back whenever the remaining quota changes, or check `api.limit_rem` any time.
|
|
92
92
|
- HTTP errors raise `fastspec.errors.APIError`, which carries `.status_code` and the endpoint called.
|
|
93
93
|
- `per_page` maxes out at 100; beyond that, use `paged`/`pages` rather than manually looping `page=`.
|
|
94
|
-
- Per-call headers on named endpoints use `
|
|
94
|
+
- Per-call headers on named endpoints use `headers_=` (e.g. `await api.pulls.get(n, headers_={'Accept': 'application/vnd.github.v3.diff'})` for the raw diff); plain `headers=` is a kwarg only for direct `api(path, verb, ...)` calls.
|
|
95
95
|
- `GITHUB_TOKEN` unset means unauthenticated (heavily rate-limited, no write access) -- `GhApi()` warns but doesn't raise.
|
|
96
96
|
"""
|
|
97
97
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ghapi
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: A python client for the GitHub API
|
|
5
5
|
Author-email: Jeremy Howard <info@fast.ai>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -16,7 +16,7 @@ Requires-Python: >=3.10
|
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Requires-Dist: fastcore>=2.2.6
|
|
19
|
-
Requires-Dist: fastspec>=0.
|
|
19
|
+
Requires-Dist: fastspec>=0.2.0
|
|
20
20
|
Requires-Dist: tomli; python_version < "3.11"
|
|
21
21
|
Provides-Extra: dev
|
|
22
22
|
Requires-Dist: fastgit; extra == "dev"
|
|
@@ -12,7 +12,7 @@ license = {text = "Apache-2.0"}
|
|
|
12
12
|
authors = [{name = "Jeremy Howard", email = "info@fast.ai"}]
|
|
13
13
|
keywords = ['github', 'api']
|
|
14
14
|
classifiers = ["Natural Language :: English", "Intended Audience :: Developers", "Development Status :: 5 - Production/Stable", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only"]
|
|
15
|
-
dependencies = ['fastcore>=2.2.6', 'fastspec>=0.
|
|
15
|
+
dependencies = ['fastcore>=2.2.6', 'fastspec>=0.2.0', 'tomli; python_version < "3.11"']
|
|
16
16
|
|
|
17
17
|
[project.urls]
|
|
18
18
|
Repository = "https://github.com/fastai/ghapi"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|