Skip to content

Release comment gate should not count approval-only reviews #20

@gaelic-ghost

Description

@gaelic-ghost

Summary

The maintain-project-repo release helper's check_pr_comments gate counts every GitHub review object as a blocking comment, even when the review is approval-only and has no actionable comment thread.

Observed behavior

In a downstream gaelic-ghost/SpeakSwiftlyServer release PR, the generated scripts/repo-maintenance/release.sh comment gate used a query shaped like this:

gh pr view "$pr_number" --json comments,reviews --jq '([.comments[]?, .reviews[]?] | length)'

Because .reviews includes approvals and other review states, an approval-only review can make the release script think there are unresolved comments. In standard release mode, that forces maintainers to pass the review-comments override even when there is no actionable feedback left to address.

Expected behavior

check_pr_comments should only count actionable review objects or comment-bearing review states.

The downstream fix in SpeakSwiftlyServer was to count only COMMENTED reviews:

gh pr view "$pr_number" --json comments,reviews --jq '([.comments[]?, .reviews[]? | select(.state == "COMMENTED")] | length)'

That keeps approval-only reviews from blocking release preparation while preserving the guard for actual PR comments and comment-style reviews.

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions