Skip to content

Commit 474674c

Browse files
committed
lint
1 parent 31add35 commit 474674c

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ def _get_authenticated_user(self) -> str:
130130
:raises requests.RequestException: If API call fails
131131
"""
132132
url = "https://api.github.com/user"
133-
response = requests.get(
134-
url, headers=self._get_request_headers(), timeout=10
135-
)
133+
response = requests.get(url, headers=self._get_request_headers(), timeout=10)
136134
response.raise_for_status()
137135
return response.json()["login"]
138136

@@ -183,17 +181,13 @@ def _create_issue_branch(self, fork_path: str, issue_number: str) -> None:
183181
"""
184182
# First, get the default branch SHA
185183
url = f"https://api.github.com/repos/{fork_path}"
186-
response = requests.get(
187-
url, headers=self._get_request_headers(), timeout=10
188-
)
184+
response = requests.get(url, headers=self._get_request_headers(), timeout=10)
189185
response.raise_for_status()
190186
default_branch = response.json()["default_branch"]
191187

192188
# Get the SHA of the default branch
193189
url = f"https://api.github.com/repos/{fork_path}/git/ref/heads/{default_branch}"
194-
response = requests.get(
195-
url, headers=self._get_request_headers(), timeout=10
196-
)
190+
response = requests.get(url, headers=self._get_request_headers(), timeout=10)
197191
response.raise_for_status()
198192
sha = response.json()["object"]["sha"]
199193

@@ -218,9 +212,7 @@ def _create_fork(self, owner: str, repo: str) -> str:
218212
:raises requests.RequestException: If fork creation fails
219213
"""
220214
url = f"https://api.github.com/repos/{owner}/{repo}/forks"
221-
response = requests.post(
222-
url, headers=self._get_request_headers(), timeout=10
223-
)
215+
response = requests.post(url, headers=self._get_request_headers(), timeout=10)
224216
response.raise_for_status()
225217

226218
fork_data = response.json()

0 commit comments

Comments
 (0)