mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Correct Repository.get_git_tree recursive use (#767)
The API docs for Repository.get_git_tree specify that the URL parameter for fetching a tree recursively should be ?recursive=1, not a truthy value. To not change the API we present, check if it is True before setting it to 1. Change another callsite of Repository.get_git_tree to specify recursive=False to make sure it doesn't appear in the query string. Fixes #560
This commit is contained in:
committed by
Wan Liuyang
parent
d9071a9eda
commit
bd0cf30970
@@ -267,7 +267,7 @@ class Repository(Framework.TestCase):
|
||||
self.assertEqual(tree.sha, "41cf8c178c636a018d537cb20daae09391efd70b")
|
||||
|
||||
def testCreateGitTreeWithBaseTree(self):
|
||||
base_tree = self.repo.get_git_tree("41cf8c178c636a018d537cb20daae09391efd70b")
|
||||
base_tree = self.repo.get_git_tree("41cf8c178c636a018d537cb20daae09391efd70b", recursive=False)
|
||||
tree = self.repo.create_git_tree(
|
||||
[github.InputGitTreeElement(
|
||||
"Barbaz.txt",
|
||||
|
||||
Reference in New Issue
Block a user