Use change revision for CR+1 button
In the current implementation, if the reviwer is looking at the previous
patchset and clicks on CR+1, the +1 is applied on the latest patchset instead of the current one. This change fixes it by updating the approval to use the patchset id.
Bug: b/250857945
Change-Id: Ifa5db2f2485cca385f8dd2eb34f5c3af76934eb7
diff --git a/web/autosubmit.ts b/web/autosubmit.ts
index 6ec1d95..9562404 100644
--- a/web/autosubmit.ts
+++ b/web/autosubmit.ts
@@ -168,7 +168,7 @@
sendToCQ: boolean
) {
// TODO(rmistry): Add getChangeNum to GrChangeActionsInterface?
- const url = `/changes/${change._number}/revisions/current/review`;
+ const url = `/changes/${change._number}/revisions/${change.current_revision}/review`;
const body: {labels: {[k: string]: string}; drafts: string} = {
labels: {
[REVIEW_LABEL]: `+${REVIEW_LABEL_MAX_VALUE}`,