aboutcode-org / aboutcode-org/purldb

Add shared helper for listing Git tags via git ls-remote

未關閉
#735 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
HTML
星號
67
分支
69
平均合併
8 天 8 小時
30 天內合併 PR
1

描述

We currently duplicate logic for listing tags via git ls-remote [purl2vcs/find_source_repo.py#L384](https://github.com/aboutcode-org/purldb/blob/c468a762a13286e857ca236ebf7dadb5be157c57/purl2vcs/src/purl2vcs/find_source_repo.py#L384)

Create a single shared helper (e.g. list_tags_via_ls_remote) to avoid duplication and provide consistent behavior.

Refs:

- https://github.com/aboutcode-org/purldb/pull/725
- https://github.com/aboutcode-org/vulnerablecode/issues/493
- https://github.com/gitpython-developers/GitPython/blob/2d4c54154bc984f5dafde1b23e377e2dc3214cb8/test/lib/helper.py#L307
- minecode_pipelines/miners/swift.py
```
result = subprocess.run(
[git_executable, "ls-remote", repo_url],
capture_output=True,
text=True,
check=True,
timeout=timeout,
)
```

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。