aboutcode-org / aboutcode-org/purldb

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

Đang mở
#735 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
HTML
Star
67
Fork
69
Merge trung bình
8 ngày 8 giờ
Pull request đã merge (30 ngày)
1

Mô tả

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,
)
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.