Skip to content

fix(#3311): ignore pending reviews in code-was-reviewed - #3312

Open
opusstudiohq-max wants to merge 1 commit into
zerocracy:masterfrom
opusstudiohq-max:3311
Open

opusstudiohq-max wants to merge 1 commit into
zerocracy:masterfrom
opusstudiohq-max:3311

Conversation

@opusstudiohq-max

Copy link
Copy Markdown
Contributor

Closes #3311.

GitHub pending pull request reviews arrive with submitted_at: nil (or blank). Previously, code-was-reviewed.rb counted pending reviews in f.reviews and attempted to compute review[:submitted_at] - pr[:created_at], raising NoMethodError (or storing nil for n.when).

This change filters Jp.human_comments(reviews) once to keep only submitted reviews by non-author humans before computing f.reviews and recording code-was-reviewed facts, with unit tests covering mixed and pending-only reviews.

This branch has not been deployed

No deployments
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.

code-was-reviewed counts pending reviews and crashes when submitted_at is nil

1 participant