File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/haystack_integrations/components/connectors/github Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 99class 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
You can’t perform that action at this time.
0 commit comments