Skip to content

Commit 47a1c1f

Browse files
committed
fix: test issue
1 parent 0067644 commit 47a1c1f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

integrations/github/src/haystack_integrations/components/connectors/github/repo_forker.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def __init__(
6060
:param auto_sync: If True, syncs fork with original repository if it already exists
6161
:param create_branch: If True, creates a fix branch based on the issue number
6262
"""
63-
error_message = "github_token must be a Secret"
64-
if not isinstance(github_token, Secret):
65-
raise TypeError(error_message)
63+
if github_token is not None and not isinstance(github_token, Secret):
64+
msg = "github_token must be a Secret"
65+
raise TypeError(msg)
6666

6767
self.github_token = github_token
6868
self.raise_on_failure = raise_on_failure

integrations/github/tests/test_repo_forker_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
class TestGitHubRepoForkerTool:
1010
def test_init(self, monkeypatch):
1111
monkeypatch.setenv("GITHUB_TOKEN", "test-token")
12-
tool = GitHubRepoForkerTool()
1312

13+
tool = GitHubRepoForkerTool()
1414
assert tool.name == "repo_forker"
1515
assert tool.description == REPO_FORKER_PROMPT
1616
assert tool.parameters == REPO_FORKER_SCHEMA

0 commit comments

Comments
 (0)