Opening a PR right after pushing runs the dry run twice and posts two comments
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
- #1140 de @TovaBecker — cerrado sin fusionar
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 66/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- github, javascript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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).
- Lenguaje dominante
- JavaScript
- Estrellas
- 942
- Forks
- 238
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de github-community-projects/safe-settings
-
Teams: teams with organization-role access show up as deletionsPosiblemente ocupada @TovaBecker la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
github-community-projects/safe-settings#1144 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
github-community-projects/safe-settings#1143 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
github-community-projects/safe-settings#1135 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
github-community-projects/safe-settings#1134 ·
Los mantenedores suelen responder en 2 días
-
environments: additive_plugins is ignored, undeclared environments are deletedPosiblemente ocupada @yaunj la tomó hace 12 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
github-community-projects/safe-settings#1133 ·
Los mantenedores suelen responder en 2 días
Todos los issues de github-community-projects/safe-settings
Issues similares
-
priority: low server testing
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
blamechris/chroxy#9277 ·
Los mantenedores suelen responder en 1 día
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
microsoft/playwright#44289 ·
Los mantenedores suelen responder en 1 día
-
Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Ionaru/easy-markdown-editor#657 ·
-
[source] Camera Blocking StageAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
TMHSDigital/Free-Game-Dev-Assets#320 ·
Los mantenedores suelen responder en 1 día
-
area:webapp bug finding
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día