dmitri.shuralyov.com/service/change/...

githubapi: Support PullRequestReviewStateDismissed state.
dmitshur committed 6 years ago commit c9ee6c5e72e377b822033b9625bcce02de16289f
Collapse all
githubapi/githubapi.go
@@ -803,14 +803,17 @@ func ghPRReviewState(state githubql.PullRequestReviewState) change.ReviewState {
		return change.Approved
	case githubql.PullRequestReviewStateCommented:
		return change.Commented
	case githubql.PullRequestReviewStateChangesRequested:
		return change.ChangesRequested
	case githubql.PullRequestReviewStateDismissed:
		// PullRequestReviewStateDismissed are reviews that have been retroactively dismissed.
		// Display them as a regular comment review for now (we can't know the original state).
		// THINK: Consider displaying these more distinctly.
		return change.Commented
	case githubql.PullRequestReviewStatePending:
		panic("PullRequestReviewStatePending not implemented") // TODO.
	case githubql.PullRequestReviewStateDismissed:
		panic("PullRequestReviewStateDismissed not implemented") // TODO.
	default:
		panic("unreachable")
	}
}