Skip to content

Commit bd41029

Browse files
authored
fix(github-comments): remove extra slash from PATCH url (#51711)
1 parent 8196928 commit bd41029

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/sentry/integrations/github/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ def create_comment(self, repo: str, issue_id: str, data: Mapping[str, Any]) -> J
558558
return self.post(endpoint, data=data)
559559

560560
def update_comment(self, repo: str, comment_id: str, data: Mapping[str, Any]) -> JSONData:
561-
endpoint = f"/repos/{repo}/issues/comments/{comment_id}/"
561+
endpoint = f"/repos/{repo}/issues/comments/{comment_id}"
562562
return self.patch(endpoint, data=data)
563563

564564
def get_user(self, gh_username: str) -> JSONData:

tests/sentry/integrations/github/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def test_update_comment(self, get_jwt):
319319

320320
responses.add(
321321
method=responses.PATCH,
322-
url=f"https://api.github.com/repos/{self.repo.name}/issues/comments/1/",
322+
url=f"https://api.github.com/repos/{self.repo.name}/issues/comments/1",
323323
json={
324324
"id": 1,
325325
"node_id": "MDEyOklzc3VlQ29tbWVudDE=",

tests/sentry/tasks/integrations/github/test_pr_comment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ def test_comment_workflow_updates_comment(self, get_jwt, mock_issues):
370370
)
371371
responses.add(
372372
responses.PATCH,
373-
self.base_url + "/repos/getsentry/sentry/issues/comments/1/",
373+
self.base_url + "/repos/getsentry/sentry/issues/comments/1",
374374
json={"id": 1},
375375
)
376376

0 commit comments

Comments
 (0)