Refactor commenting strategies for better reusability
- Ngôn ngữ chính
- Go
- Star
- 26
- Fork
- 7
- Merge trung bình
- 1 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 1
Mô tả
### TL;DR
Current commenting strategies in the plan and apply commands duplicate code frequently.
### Detailed design
```markdown
Two options top of mind:
1) We can create helper functions to generate the different types of messages (e.g. https://github.com/abcxyz/guardian/pull/352#discussion_r1704680358)
2) We can create a reporter/commenter interface and implement it for github to allow for potential future strategies. The interface would require methods for generating the different messages and writing them to the output (github, stdout, etc)
```
### Alternatives considered
_No response_
### Additional information
_No response_
Hướng dẫn đóng góp
Hướng nghiên cứu
Xem xét các lệnh plan và apply để tìm phần mã bình luận bị trùng lặp. Cuộc thảo luận về PR #352 đề cập đến các hàm trợ giúp. Trước tiên, hãy hiểu cách tạo thông báo hiện tại trong các lệnh đó. Sau đó, thiết kế một giao diện reporter/commenter hoặc các hàm trợ giúp để tập trung hóa logic. Kiểm tra các chiến lược đầu ra hiện có (GitHub, stdout) để xem thông báo được ghi như thế nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Lĩnh vực
- backend, cli
- Loại issue
- Tái cấu trúc
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100