Skip to content

Add automated PR check for contributing criteria#1776

Merged
mre merged 11 commits intomasterfrom
add-pr-check
Mar 22, 2026
Merged

Add automated PR check for contributing criteria#1776
mre merged 11 commits intomasterfrom
add-pr-check

Conversation

@mre
Copy link
Copy Markdown
Member

@mre mre commented Mar 20, 2026

Adds a Rust binary crate at data/pr-check and a new workflow .github/workflows/pr-check.yml that automatically checks every PR touching data/tools/ against the contributing criteria.

For each newly added tool YAML the check fetches data from the GitHub API and evaluates:

  • Stars (minimum 20)
  • Human contributors (minimum 2)
  • Repository age (minimum 3 months)

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.

mre added 6 commits March 20, 2026 12:14
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.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 22, 2026

Contributing criteria check

No new tool files detected in data/tools/. Nothing to check.

@mre mre merged commit 82111c5 into master Mar 22, 2026
3 checks passed
@mre mre deleted the add-pr-check branch March 22, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant