mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-22 12:53:19 +00:00
Developers can attach sample files to a PR and list their target paths within the fate-suite in a fate-samples block in the PR description: ```fate-samples vorbis/tos.ogg mov/some-new-sample.mov ``` A new inject-pr-samples.py script fetches the PR metadata from the Forgejo API, resolves each listed path to its matching attachment by filename, and downloads the files into the fate-suite directory before FATE runs. The script validates that pr-number is an integer, that paths are relative, contain no '..', and are at most 3 components deep (matching the deepest paths in the existing fate-suite). Attachment URLs are restricted to the code.ffmpeg.org domain. The script exports a new_samples=true/false output via $FORGEJO_OUTPUT. After FATE completes, a final workflow step fails the run if any new sample was injected, reminding contributors to add their samples to the official fate-suite before the PR can be merged. The script can also be used locally: SAMPLES=/path/to/fate-suite .forgejo/inject-pr-samples.py <pr-number>