Skip to content

Commit 6946be4

Browse files
Jonathan Muchaclaude
andcommitted
fix: use context instead of name for commit status
GitLab rejects duplicate name field; context allows updates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 697a121 commit 6946be4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

socketsecurity/core/scm/gitlab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def set_commit_status(self, state: str, description: str, target_url: str = '')
279279
url = f"{self.config.api_url}/projects/{self.config.mr_project_id}/statuses/{self.config.commit_sha}"
280280
payload = {
281281
"state": state,
282-
"name": "socket-security",
282+
"context": "socket-security",
283283
"description": description,
284284
}
285285
if target_url:

tests/unit/test_gitlab_commit_status.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_calls_correct_url_and_json_payload(self, mock_post):
4343
"https://gitlab.example.com/api/v4/projects/99/statuses/abc123def456",
4444
json={
4545
"state": "success",
46-
"name": "socket-security",
46+
"context": "socket-security",
4747
"description": "No blocking issues",
4848
"target_url": "https://app.socket.dev/report/123",
4949
},

0 commit comments

Comments
 (0)