python / python/devguide

Add a workflow to regularly run `make linkcheck`

Đang mở
#917 1 bình luận 4 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

infra type-feature
Ngôn ngữ chính
Python
Star
2.1k
Fork
1k
Merge trung bình
2 ngày 12 giờ
Pull request đã merge (30 ngày)
12

Mô tả

This is a follow-up of #727 and related to #681. Since make linkcheck is somewhat unreliable and can't be required for regular PR, the idea is to use a workflow to run it regularly and create (or update) an issue when a link is unreachable. Note that make linkcheck is already run for PRs, but the result is only visible by looking at the logs.

@AlexWaygood shared a similar workflow in https://github.com/python/devguide/pull/727#issuecomment-1100939982:

Over at typeshed, we have a test that runs every night. If it fails, a bot auto-creates an issue for us. It works pretty well!

Here's the .yml file: https://github.com/python/typeshed/blob/master/.github/workflows/daily.yml

And here's an example of an issue that the bot auto-created when the test failed: https://github.com/python/typeshed/issues/7572

This workflow creates a new issue every time, and it might be ok if it's run weekly/monthly however -- if we want to run it more frequently -- updating an existing issue might be a better approach.

@hugovk also raised a concern in https://github.com/python/devguide/pull/727#issuecomment-1100912440

One concern: if the cron is often failing (which it might, and often), we don't want it to show the repo as failed at the top:

If this sounds useful we can agree on the details, fix the currently broken links, and adapt the workflow linked above.

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

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Kiểm tra workflow PR hiện có chạy make linkcheck và so sánh workflow đó với tệp typeshed được tham chiếu .github/workflows/daily.yml. Quyết định xem workflow theo lịch có nên tạo các issue mới hay cập nhật một issue hiện có, đồng thời đảm bảo các lỗi liên kết được báo cáo mà không khiến các bước kiểm tra PR thông thường của repository thất bại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
github-actions, python
Lĩnh vực
ci-cd, documentation
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 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
28/100

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.