diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b82c54..076ac73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ## [Unreleased] +* Add: Endpoint variable to support both prs and issues to GitHubAPI (@lwasser) + ## [v0.3.4] - 2024-08-01 ### Fixes diff --git a/tests/unit/test_github_api.py b/tests/unit/test_github_api.py index daa2c1d..f3d7b1c 100644 --- a/tests/unit/test_github_api.py +++ b/tests/unit/test_github_api.py @@ -71,6 +71,27 @@ def test_missing_token(mock_missing_github_token, tmpdir): ["label1", "label2"], "https://api.github.com/repos/pyopensci/pyosmeta/issues?state=all&per_page=100", ), + ( + "pyopensci", + "pyosmeta", + "pulls", + [], + "https://api.github.com/repos/pyopensci/pyosmeta/pulls?state=all&per_page=100", + ), + ( + "pyopensci", + "pyosmeta", + "pulls", + ["label1"], + "https://api.github.com/repos/pyopensci/pyosmeta/pulls?labels=label1&state=all&per_page=100", + ), + ( + "pyopensci", + "pyosmeta", + "pulls", + ["label1", "label2"], + "https://api.github.com/repos/pyopensci/pyosmeta/pulls?state=all&per_page=100", + ), ], ) def test_api_endpoint(org, repo, endpoint_type, labels, expected_url):