@@ -240,6 +240,7 @@ def test_build_payload_from_claude_jsonl_redacts_secrets_and_skips_non_messages(
240240 self .assertEqual (payload ["provider" ], "claude_code" )
241241 self .assertEqual (payload ["labels" ], [])
242242 self .assertEqual (payload ["repo" ], "" )
243+ self .assertEqual (payload ["repo_url" ], "" )
243244 self .assertEqual (payload ["branch" ], "plugin/sync" )
244245 self .assertEqual (payload ["source_url" ], "https://jieli.example.test/threads/T-cc-1" )
245246 self .assertEqual (payload ["thread" ]["id" ], "T-cc-1" )
@@ -255,15 +256,15 @@ def test_build_payload_from_claude_jsonl_redacts_secrets_and_skips_non_messages(
255256 self .assertNotIn ("abc.def.ghi" , raw_payload )
256257 self .assertNotIn ("tool.secret" , raw_payload )
257258
258- def test_build_payload_uses_git_remote_repo_slug (self ):
259+ def test_build_payload_includes_raw_repo_url_from_git_remote (self ):
259260 from sync import build_payload_from_hook
260261
261262 with tempfile .TemporaryDirectory () as tmpdir :
262- repo = Path (tmpdir ) / "github" / "plugins "
263+ repo = Path (tmpdir ) / "repo "
263264 repo .mkdir (parents = True )
264265 subprocess .run (["git" , "init" ], cwd = repo , check = True , stdout = subprocess .DEVNULL , stderr = subprocess .DEVNULL )
265266 subprocess .run (
266- ["git" , "remote" , "add" , "origin" , "git@github. com:jieliapp/plugins .git" ],
267+ ["git" , "remote" , "add" , "origin" , "git@home.pika12. com:guoyb/jieli .git" ],
267268 cwd = repo ,
268269 check = True ,
269270 stdout = subprocess .DEVNULL ,
@@ -291,9 +292,10 @@ def test_build_payload_uses_git_remote_repo_slug(self):
291292 base_url = "https://jieli.example.test" ,
292293 )
293294
294- self .assertEqual (payload ["repo" ], "jieliapp/plugins" )
295+ self .assertEqual (payload ["repo" ], "" )
296+ self .assertEqual (payload ["repo_url" ], "git@home.pika12.com:guoyb/jieli.git" )
295297
296- def test_build_payload_leaves_repo_empty_without_github_remote (self ):
298+ def test_build_payload_leaves_repo_metadata_empty_without_git_remote (self ):
297299 from sync import build_payload_from_hook
298300
299301 with tempfile .TemporaryDirectory () as tmpdir :
@@ -322,6 +324,7 @@ def test_build_payload_leaves_repo_empty_without_github_remote(self):
322324 )
323325
324326 self .assertEqual (payload ["repo" ], "" )
327+ self .assertEqual (payload ["repo_url" ], "" )
325328
326329 def test_build_payload_uploads_structured_image_blocks (self ):
327330 from sync import build_payload_from_hook
0 commit comments