Opening a PR right after pushing runs the dry run twice and posts two comments
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
- #1140 của @TovaBecker — đã đóng, không merge
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 66/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github, javascript
Hướng nghiên cứu
Start in index.js and trace the check_suite.requested and pull_request.opened handlers into createCheckRun. Check how existing “Safe-setting validator” check runs for the same head_sha can be found, then add or run focused coverage for the push and PR opening arriving close together. Done means one dry run and one PR comment per commit.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
When a PR is opened within a few seconds of pushing its branch, safe-settings creates two "Safe-setting validator" check runs on the same commit. Both run the dry run, and each posts its own PR comment, so the PR gets two identical comments.
Seen on 3.0.0 (df84f83): two check runs on the same head commit, started 3 seconds apart, and two identical comments.
Cause
Two handlers in index.js call createCheckRun for the same commit:
check_suite.requestedfires on the push. If the PR already exists, the payload lists it, so a check run is created.pull_request.openedfires when the PR is created and always creates a check run.
When the PR is created right after the push (for example gh pr create, or Create pull request right after committing in the web editor), both events see the PR.
Expected
One dry run and one comment per commit.
Possible fix
In createCheckRun, skip creating a check run if a "Safe-setting validator" check run already exists for the same head_sha.
Related: #737 (same symptom after a later push), #1015 (check_suite.rerequested is registered twice, so a re-run can also run twice).
- Ngôn ngữ chính
- JavaScript
- Star
- 942
- Fork
- 238
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github-community-projects/safe-settings
-
Teams: teams with organization-role access show up as deletionsCó thể đã có người làm @TovaBecker đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
github-community-projects/safe-settings#1144 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
github-community-projects/safe-settings#1143 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
github-community-projects/safe-settings#1135 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
github-community-projects/safe-settings#1134 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
environments: additive_plugins is ignored, undeclared environments are deletedCó thể đã có người làm @yaunj đã nhận 12 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
github-community-projects/safe-settings#1133 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của github-community-projects/safe-settings
Issue tương tự
-
priority: low server testing
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
blamechris/chroxy#9277 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
microsoft/playwright#44289 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Ionaru/easy-markdown-editor#657 ·
-
[source] Camera Blocking StageĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
TMHSDigital/Free-Game-Dev-Assets#320 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:webapp bug finding
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày