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

Validate the request signature screenshot in pull requests

Aperta
#8,091 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
github-actions, javascript

Direzione di ricerca

Inizia con il comando di generazione dello screenshot di #8090, con il file img/screenshot/request-signature.png committato e con gli esempi referenziati di checker.mjs e documentation-screenshots.yml. Costruisci la validazione di GitHub Actions attorno al confronto indicato, alla tolleranza, agli artefatti diff e al comportamento dei commenti nella pull request; il lavoro è completo quando tutti i criteri di accettazione sono soddisfatti senza eseguire automaticamente il commit dello screenshot.

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

Descrizione

backend frontend github_actions

The screenshot generation added in #8090 should also be validated automatically in pull requests.

The goal is to detect when changes to the LibreSign interface make img/screenshot/request-signature.png outdated.

This issue depends on #8090.

What should be done

Add a GitHub Actions workflow that:

  1. runs the screenshot generation command from #8090;
  2. compares the generated image with the committed img/screenshot/request-signature.png;
  3. uses pixelmatch or an equivalent small visual comparison library;
  4. ignores insignificant rendering differences using a reasonable tolerance;
  5. succeeds when the screenshots match within the allowed tolerance;
  6. fails when a relevant visual difference is detected.

When the comparison fails, the workflow should:

  • report the number or percentage of different pixels;
  • generate a visual diff;
  • upload the generated screenshot and diff as workflow artifacts;
  • add or update a comment in the pull request.

Reference implementation

A similar implementation can be used as reference from LSTelegramNotify:

  • [comparePngBuffers()](https://github.com/LibreCodeCoop/LSTelegramNotify/blob/c2f68cbdbe6318d134a5f2e79ccf27cded9106c0/scripts/screenshots/checker.mjs#L8-L47) shows how pixelmatch can compare two PNG buffers and report the number and percentage of different pixels;
  • [assertScreenshotsUpToDate()](https://github.com/LibreCodeCoop/LSTelegramNotify/blob/c2f68cbdbe6318d134a5f2e79ccf27cded9106c0/scripts/screenshots/checker.mjs#L49-L124) shows how a failed comparison can generate a visual diff;
  • [documentation-screenshots.yml](https://github.com/LibreCodeCoop/LSTelegramNotify/blob/c2f68cbdbe6318d134a5f2e79ccf27cded9106c0/.github/workflows/documentation-screenshots.yml) shows how screenshot validation and diff artifacts can be handled in GitHub Actions.

The LibreSign implementation does not need to copy this structure exactly.

Pull request comment

When a relevant difference is found, the workflow should leave a short comment explaining that the request signature screenshot may be outdated.

The comment should include:

  • the detected difference;
  • a note telling the contributor to run the screenshot generation command from #8090 if the visual change is expected;
  • a reference to the workflow artifacts with the generated screenshot and visual diff.

The workflow should avoid creating duplicate comments. If a screenshot validation comment already exists, update it instead.

A hidden marker can be used to identify the comment, for example:

<!-- libresign-request-signature-screenshot-check -->

No comment is needed when the screenshot matches.

The workflow must not automatically commit the generated screenshot. Updating img/screenshot/request-signature.png should remain an explicit change made after reviewing the detected visual difference.

Acceptance criteria

  • The screenshot generated by #8090 is compared with the committed img/screenshot/request-signature.png.
  • pixelmatch or an equivalent approach is used for visual comparison.
  • A documented tolerance prevents failures caused only by insignificant rendering differences.
  • The workflow succeeds when the images match within the allowed tolerance.
  • The workflow fails when a relevant visual difference is detected.
  • The comparison reports the number or percentage of different pixels.
  • A visual diff is generated when the comparison fails.
  • The generated screenshot and visual diff are uploaded as GitHub Actions artifacts.
  • A pull request comment explains when the screenshot may need to be updated.
  • Repeated runs update the existing validation comment instead of creating duplicate comments.
  • The workflow does not automatically commit screenshot changes.
Additional context
  • If you have questions, feel free to ask in this issue.
  • Give a ⭐️ star to this repository if you find LibreSign useful and would like to support the project.
  • You can also join our community: https://t.me/LibreSign
Lingua principale
PHP
Stelle
818
Fork
146
Merge medio
7h 38m
PR unite (30g)
490

Preparare l'ambiente

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 LibreSign/libresign

Tutte le issue di LibreSign/libresign

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.