From 9f25797710de76b61ae9450207feef77ee98cf58 Mon Sep 17 00:00:00 2001 From: "gitauto-for-dev[bot]" <160085510+gitauto-for-dev[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 23:22:59 +0000 Subject: [PATCH 1/2] Update tests/constants.py --- tests/constants.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/constants.py b/tests/constants.py index 8e495b84..550ff27e 100644 --- a/tests/constants.py +++ b/tests/constants.py @@ -1,3 +1,4 @@ OWNER = "gitautoai" REPO = "gitauto" INSTALLATION_ID = 60314628 +FORKED_REPO = "DeepSeek-R1" From e9202abe09975b0fa6eebf99429482f581ca0e50 Mon Sep 17 00:00:00 2001 From: "gitauto-for-dev[bot]" <160085510+gitauto-for-dev[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 23:23:39 +0000 Subject: [PATCH 2/2] Update tests/services/github/test_repo_manager.py --- tests/services/github/test_repo_manager.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/services/github/test_repo_manager.py diff --git a/tests/services/github/test_repo_manager.py b/tests/services/github/test_repo_manager.py new file mode 100644 index 00000000..604df478 --- /dev/null +++ b/tests/services/github/test_repo_manager.py @@ -0,0 +1,16 @@ +import os +import pytest +from services.github.repo_manager import is_repo_forked +from tests.constants import FORKED_REPO + +def test_is_repo_forked_integration(): + """ + Integration test for is_repo_forked function. + Verifies that the function correctly identifies a forked repository using the GitHub API. + Documentation: https://docs.github.com/en/rest/reference/repos#get-a-repository + """ + token = os.getenv("GITHUB_TOKEN", "") + if not token: + pytest.skip("GITHUB_TOKEN is not set in environment variables.") + result = is_repo_forked(FORKED_REPO, token=token) + assert result is True, f"{FORKED_REPO} should be detected as a forked repository." \ No newline at end of file