Add automated PR check for contributing criteria#1776
Merged
Conversation
Adds a new Rust binary crate at data/pr-check that runs on every PR touching data/tools/ and checks each newly added tool YAML against the contributing criteria: - More than 20 stars - More than one contributor - Repository is at least 3 months old The check posts a formatted Markdown comment on the PR summarising the results per tool, updating the existing bot comment on re-push rather than adding a new one each time. Non-GitHub sources are flagged for manual review. The CI step exits with a non-zero code when any criterion is not met, turning the check red. The workflow only triggers on PRs that touch data/tools/ and caches the cargo build to keep runs fast.
Adds data/Cargo.toml as a workspace root so both crates share a single target directory and a common set of dependency versions via [workspace.dependencies]. pr-check now depends on the render crate directly and uses render::types::ParsedEntry instead of its own ToolEntry struct, removing the duplication. The Makefile and pr-check workflow are updated to target the workspace manifest. The gitignore entry is updated from data/pr-check/target/ to data/target/.
The data/ folder now only contains source files (tools/, tags.yml, api/). The Rust code (render and pr-check crates) lives in ci/ alongside the workspace Cargo.toml and Cargo.lock. Updated references in Makefile, .github/workflows/pr-check.yml, .gitignore, data/README.md, and the stale comment at the top of README.md.
Contributing criteria checkNo new tool files detected in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a Rust binary crate at
data/pr-checkand a new workflow.github/workflows/pr-check.ymlthat automatically checks every PR touchingdata/tools/against the contributing criteria.For each newly added tool YAML the check fetches data from the GitHub API and evaluates:
Results are posted as a single Markdown comment on the PR, updated in place on each push rather than adding a new comment every time. Non-GitHub sources are flagged for manual review. The CI step exits with code 1 when any criterion is not met, so the check turns red.
The workflow only runs when
data/tools/files change and caches the cargo build between runs.