Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#136 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
github-actions, php
Ambito
ci-cd, testing

Direzione di ricerca

Inizia con la ricerca esistente di .git e .svn del test reporter, quindi esamina il workflow di GitHub Actions in cui github.event.head_commit.message è disponibile. Il lavoro è completato quando il reporter può usare i valori di commit message e revisione forniti dall’ambiente, mantenendo la scansione delle directory come fallback.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
PHP
Stelle
77
Fork
79
Merge medio
9g 2h
PR unite (30g)
5

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di WordPress/phpunit-test-runner

Tutte le issue di WordPress/phpunit-test-runner

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.