aboutcode-org / aboutcode-org/purldb

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

オープン
#735 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
HTML
スター
67
フォーク
69
平均マージ
8日 8時間
マージ済み PR(30日)
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 を短くまとめたダイジェスト。