Opening a PR right after pushing runs the dry run twice and posts two comments
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
- #1140 @TovaBecker による — マージされずにクローズ
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 66/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- github, javascript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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).
- 主要言語
- JavaScript
- スター
- 942
- フォーク
- 238
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github-community-projects/safe-settings のほかの issue
-
Teams: teams with organization-role access show up as deletions対応中かも @TovaBecker が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
github-community-projects/safe-settings#1144 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
github-community-projects/safe-settings#1143 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
github-community-projects/safe-settings#1135 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
github-community-projects/safe-settings#1134 ·
メンテナーはふだん 2 日以内に返信
-
environments: additive_plugins is ignored, undeclared environments are deleted対応中かも @yaunj が 12 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
github-community-projects/safe-settings#1133 ·
メンテナーはふだん 2 日以内に返信
github-community-projects/safe-settings の issue をすべて見る
似ている issue
-
priority: low server testing
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
blamechris/chroxy#9277 ·
メンテナーはふだん 1 日以内に返信
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
microsoft/playwright#44289 ·
メンテナーはふだん 1 日以内に返信
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Ionaru/easy-markdown-editor#657 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
TMHSDigital/Free-Game-Dev-Assets#320 ·
メンテナーはふだん 1 日以内に返信
-
area:webapp bug finding
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信