Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Allow commit message and revision to be passed through an environment variable

Abierto
#136 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
github-actions, php
Área
ci-cd, testing

Línea de trabajo

Comienza con la búsqueda existente de .git y .svn del reportero de pruebas y, después, inspecciona el workflow de GitHub Actions donde github.event.head_commit.message está disponible. Se considera terminado cuando el reportero puede usar los valores de mensaje de commit y revisión proporcionados por el entorno, manteniendo la búsqueda de directorios como fallback.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement needs assignee tooling WCUS26

WordPress Core currently runs PHPUnit tests in two steps.

The first step checks out the WordPress repo, installs NPM, builds WP for use, and then zips everything to upload as an artifact on the workflow run. After that, individual jobs are created for various PHP/Memcached combinations to run the PHPUnit tests by downloading the previously built artifact. This prevents every job from needing to perform these steps.

However, the .git folder is not packaged and included in the artifact to save space (and it's no longer needed anyway).

When the test reporter submits results, it scans for .git and .svn directories to grab the commit message and revision number to associate the results with. In order for this to work successfully, the Git repo needs to be reconnected to the codebase (see Core revision 49786).

The GitHub Action runner provides this information through the github workflow context. In the case of a push trigger event, the context would be github.event.head_commit.message (see https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/webhook-events-and-payloads#push).

If the runner first checked for environment variables and fell back to searching for those directories as a second option, that information could be passed to the reporter without having to reestablish the directory as a Git repository.

Lenguaje dominante
PHP
Estrellas
77
Forks
79
Merge medio
4 d 19 h
PR fusionados (30 d)
3

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de WordPress/phpunit-test-runner

Todos los issues de WordPress/phpunit-test-runner

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.