Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync GitRef class with API spec #3128

Merged
merged 4 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated test class according to API spec
  • Loading branch information
EnricoMi committed Jan 8, 2025
commit 5ec14b8e0e9800e5bc594ae56d569061e5f524b3
1 change: 1 addition & 0 deletions github/GitRef.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
from __future__ import annotations

from typing import TYPE_CHECKING, Any
import github.GitObject

import github.GithubObject
import github.GitObject
Expand Down
3 changes: 3 additions & 0 deletions tests/GitRef.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
# #
################################################################################

from __future__ import annotations

from . import Framework


Expand All @@ -41,6 +43,7 @@ def setUp(self):
self.ref = self.g.get_user().get_repo("PyGithub").get_git_ref("heads/BranchCreatedByPyGithub")

def testAttributes(self):
self.assertEqual(self.ref.node_id, "")
self.assertEqual(self.ref.object.sha, "1292bf0e22c796e91cc3d6e24b544aece8c21f2a")
self.assertEqual(self.ref.object.type, "commit")
self.assertEqual(
Expand Down