mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
Use right variable in both get_check_runs() (#1889)
Both CheckSuite and Commit have a get_check_runs() method that allows filtering by a string -- the original code did not check for it, and never added it to the query string since it checked the wrong variable. Check the right variable and re-record the replay data. Fixes #1843
This commit is contained in:
@@ -193,7 +193,7 @@ class CheckSuite(github.GithubObject.CompletableGithubObject):
|
||||
url_parameters["check_name"] = check_name
|
||||
if status is not github.GithubObject.NotSet:
|
||||
url_parameters["status"] = status
|
||||
if status is not github.GithubObject.NotSet:
|
||||
if filter is not github.GithubObject.NotSet:
|
||||
url_parameters["filter"] = filter
|
||||
return github.PaginatedList.PaginatedList(
|
||||
github.CheckRun.CheckRun,
|
||||
|
||||
+1
-1
@@ -281,7 +281,7 @@ class Commit(github.GithubObject.CompletableGithubObject):
|
||||
url_parameters["check_name"] = check_name
|
||||
if status is not github.GithubObject.NotSet:
|
||||
url_parameters["status"] = status
|
||||
if status is not github.GithubObject.NotSet:
|
||||
if filter is not github.GithubObject.NotSet:
|
||||
url_parameters["filter"] = filter
|
||||
return github.PaginatedList.PaginatedList(
|
||||
github.CheckRun.CheckRun,
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -2,7 +2,7 @@ https
|
||||
GET
|
||||
api.github.com
|
||||
None
|
||||
/repos/dhruvmanila/pygithub-testing/check-suites/1366665055/check-runs?per_page=1
|
||||
/repos/dhruvmanila/pygithub-testing/check-suites/1366665055/check-runs?filter=all&per_page=1
|
||||
{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
None
|
||||
200
|
||||
@@ -13,7 +13,7 @@ https
|
||||
GET
|
||||
api.github.com
|
||||
None
|
||||
/repos/dhruvmanila/pygithub-testing/check-suites/1366665055/check-runs
|
||||
/repos/dhruvmanila/pygithub-testing/check-suites/1366665055/check-runs?filter=all
|
||||
{'Accept': 'application/vnd.github.v3+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
None
|
||||
200
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user