From 0d2004f0751ff45ae25c2d671fc9bdf94f1b5cda Mon Sep 17 00:00:00 2001 From: Peter Goodspeed-Niklaus Date: Thu, 18 Jun 2026 15:24:07 +0200 Subject: [PATCH] chore: reviews link directly to the review, not to the overall PR --- src/main/kotlin/com/wire/github/response/model/Review.kt | 5 ++++- .../templates/en/pull_request_review.submitted.template | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/wire/github/response/model/Review.kt b/src/main/kotlin/com/wire/github/response/model/Review.kt index 4376be1..1f917e0 100644 --- a/src/main/kotlin/com/wire/github/response/model/Review.kt +++ b/src/main/kotlin/com/wire/github/response/model/Review.kt @@ -1,12 +1,15 @@ package com.wire.github.response.model +import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable data class Review( val body: String? = null, val user: User, - val state: String + val state: String, + @SerialName("html_url") + val htmlUrl: String ) { val approved: Boolean get() = state.equals("approved", ignoreCase = true) val changesRequested: Boolean get() = state.equals("changes_requested", ignoreCase = true) diff --git a/src/main/resources/templates/en/pull_request_review.submitted.template b/src/main/resources/templates/en/pull_request_review.submitted.template index 7247e9c..f245033 100644 --- a/src/main/resources/templates/en/pull_request_review.submitted.template +++ b/src/main/resources/templates/en/pull_request_review.submitted.template @@ -1,7 +1,7 @@ {{! Fired on the "pull_request_review" event: a reviewer finished a review via "Review changes". }} {{! SURPRISE: a bare Approve carries no body, so only the prefix line renders. }} {{! Any inline diff-line comments made in the same review arrive as separate pull_request_review_comment events, which we intentionally do not notify on. }} -[**{{{pullRequest.title}}}**]({{pullRequest.htmlUrl}}): {{#review.approved}}✅ **Approved** by {{/review.approved}}{{#review.changesRequested}}🔴 **Changes requested** by {{/review.changesRequested}} **@{{review.user.login}}** {{#review.commented}}Commented{{/review.commented}} +[**{{{pullRequest.title}}}**]({{review.htmlUrl}}): {{#review.approved}}✅ **Approved** by {{/review.approved}}{{#review.changesRequested}}🔴 **Changes requested** by {{/review.changesRequested}} **@{{review.user.login}}** {{#review.commented}}Commented{{/review.commented}} {{#review.body}} {{{review.body}}} {{/review.body}}