+ )
+ }
- // // Some checks do not provide htmlURLS like ones for the legacy status
- // // object as they do not have a view in the checks screen. In that case we
- // // will just open the PR and they can navigate from there... a little
- // // dissatisfying tho more of an edgecase anyways.
- // const url =
- // review.html_url ||
- // `${repository.gitHubRepository.htmlURL}/pull/${pullRequest.pullRequestNumber}#pullrequestreview-${review.id}`
- // if (url === null) {
- // // The repository should have a htmlURL.
- // return
- // }
- // dispatcher.openInBrowser(url)
- // }
+ private viewOnGitHub = () => {
+ const { repository, pullRequest, dispatcher, review } = this.props
+
+ // Some checks do not provide htmlURLS like ones for the legacy status
+ // object as they do not have a view in the checks screen. In that case we
+ // will just open the PR and they can navigate from there... a little
+ // dissatisfying tho more of an edgecase anyways.
+ const url =
+ review.html_url ||
+ `${repository.gitHubRepository.htmlURL}/pull/${pullRequest.pullRequestNumber}#pullrequestreview-${review.id}`
+ if (url === null) {
+ // The repository should have a htmlURL.
+ return
+ }
+ dispatcher.openInBrowser(url)
+ }
private onSubmit = async (event: React.MouseEvent) => {
event.preventDefault()