Skip to content

Instantly share code, notes, and snippets.

@rparrett
Last active February 19, 2024 14:05
Show Gist options
  • Save rparrett/a0e37668073362c64e0435a963835a49 to your computer and use it in GitHub Desktop.
Save rparrett/a0e37668073362c64e0435a963835a49 to your computer and use it in GitHub Desktop.
Find Bevy PRs that have two approvals but lack the `S-Ready-For-Final-Review` label
def filter(cond): map(select(cond));
.[] | [
.number,
(.reviews | filter(.state=="APPROVED") | unique_by(.author.login) | length),
(.labels | any(.name == "S-Ready-For-Final-Review" or .name == "S-Blocked" or .name == "S-Needs-Benchmarking" or .name == "S-Needs-Design" or .name == "S-Adopt-Me" or .name == "S-Needs-RFC" ) | not)
] | select((.[1] >= 2) and .[2]) | ("<a href=\"https://github.com/bevyengine/bevy/pull/" + (.[0] | tostring) + "\">" + (.[0] | tostring) + "</a><br/>")
gh pr list --json number,title,reviews,labels --limit 2000 | jq -r -f ~/bin/has-two-approvals.jq > /tmp/has_two.html && open /tmp/has_two.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment