github-rest-api 0.33.1__tar.gz → 0.34.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.
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/PKG-INFO +1 -1
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/github_rest_api/github.py +6 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/pyproject.toml +1 -1
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/tests/test_github.py +9 -1
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/uv.lock +1 -1
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/.gemini/system.md +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/.github/workflows/create_pr_dev_to_main.yml +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/.github/workflows/create_pr_to_dev.yml +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/.github/workflows/lint.yml +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/.github/workflows/release.yml +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/.gitignore +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/.gitpod.yml +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/GEMINI.md +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/README.md +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/github_rest_api/__init__.py +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/github_rest_api/actions/__init__.py +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/github_rest_api/actions/cargo/__init__.py +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/github_rest_api/actions/cargo/benchmark.py +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/github_rest_api/actions/cargo/profiling.py +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/github_rest_api/actions/cargo/utils.py +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/github_rest_api/actions/utils.py +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/github_rest_api/utils.py +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/tests/__init__.py +0 -0
- {github_rest_api-0.33.1 → github_rest_api-0.34.0}/tests/test_utils.py +0 -0
|
@@ -255,6 +255,12 @@ class Repository(GitHub):
|
|
|
255
255
|
"""List branches in this repository."""
|
|
256
256
|
return self._get(url=self._url_branches).json()
|
|
257
257
|
|
|
258
|
+
def get_branch(self, branch: str) -> dict[str, Any]:
|
|
259
|
+
"""Get information about a specific branch.
|
|
260
|
+
:param branch: The name of the branch.
|
|
261
|
+
"""
|
|
262
|
+
return self._get(url=f"{self._url_branches}/{branch}").json()
|
|
263
|
+
|
|
258
264
|
def delete(self) -> requests.Response:
|
|
259
265
|
"""Delete this repository from GitHub."""
|
|
260
266
|
return self._delete(url=self._url_repo)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from github_rest_api.github import User, Organization
|
|
1
|
+
from github_rest_api.github import User, Organization, Repository
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
def test_user_get_repositories():
|
|
@@ -15,3 +15,11 @@ def test_organization_get_repositories():
|
|
|
15
15
|
org = Organization(token, org_name)
|
|
16
16
|
repos = org.get_repositories()
|
|
17
17
|
assert len(repos) > 0
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def test_repository_get_branch():
|
|
21
|
+
token = ""
|
|
22
|
+
repo_name = "legendu-net/github_rest_api"
|
|
23
|
+
repo = Repository(token, repo_name)
|
|
24
|
+
branch = repo.get_branch("main")
|
|
25
|
+
assert branch["name"] == "main"
|
|
File without changes
|
{github_rest_api-0.33.1 → github_rest_api-0.34.0}/.github/workflows/create_pr_dev_to_main.yml
RENAMED
|
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
|
{github_rest_api-0.33.1 → github_rest_api-0.34.0}/github_rest_api/actions/cargo/benchmark.py
RENAMED
|
File without changes
|
{github_rest_api-0.33.1 → github_rest_api-0.34.0}/github_rest_api/actions/cargo/profiling.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|