Merge "Attach o=STAR on change list queries in frontend."
diff --git a/java/com/google/gerrit/httpd/raw/IndexPreloadingUtil.java b/java/com/google/gerrit/httpd/raw/IndexPreloadingUtil.java
index 402e48a..36fa61b 100644
--- a/java/com/google/gerrit/httpd/raw/IndexPreloadingUtil.java
+++ b/java/com/google/gerrit/httpd/raw/IndexPreloadingUtil.java
@@ -87,7 +87,8 @@
ImmutableSet.of(
ListChangesOption.LABELS,
ListChangesOption.DETAILED_ACCOUNTS,
- ListChangesOption.SUBMIT_REQUIREMENTS);
+ ListChangesOption.SUBMIT_REQUIREMENTS,
+ ListChangesOption.STAR);
public static final ImmutableSet<ListChangesOption> CHANGE_DETAIL_OPTIONS =
ImmutableSet.of(
diff --git a/polygerrit-ui/app/services/gr-rest-api/gr-rest-api-impl.ts b/polygerrit-ui/app/services/gr-rest-api/gr-rest-api-impl.ts
index ba6e384..ceb5e9d 100644
--- a/polygerrit-ui/app/services/gr-rest-api/gr-rest-api-impl.ts
+++ b/polygerrit-ui/app/services/gr-rest-api/gr-rest-api-impl.ts
@@ -1016,6 +1016,12 @@
});
}
+ /**
+ * Construct the uri to get list of changes.
+ *
+ * If options is undefined then default options (see _getChangesOptionsHex) is
+ * used.
+ */
getRequestForGetChanges(
changesPerPage?: number,
query?: string[] | string,
@@ -1044,6 +1050,12 @@
return request;
}
+ /**
+ * For every query fetches the matching changes.
+ *
+ * If options is undefined then default options (see _getChangesOptionsHex) is
+ * used.
+ */
getChangesForMultipleQueries(
changesPerPage?: number,
query?: string[],
@@ -1085,6 +1097,12 @@
});
}
+ /**
+ * Fetches changes that match the query.
+ *
+ * If options is undefined then default options (see _getChangesOptionsHex) is
+ * used.
+ */
getChanges(
changesPerPage?: number,
query?: string,
@@ -1190,6 +1208,7 @@
ListChangesOption.LABELS,
ListChangesOption.DETAILED_ACCOUNTS,
ListChangesOption.SUBMIT_REQUIREMENTS,
+ ListChangesOption.STAR,
];
return listChangesOptionsToHex(...options);
diff --git a/polygerrit-ui/app/utils/change-util.ts b/polygerrit-ui/app/utils/change-util.ts
index 7de5e7e..a62fcf3 100644
--- a/polygerrit-ui/app/utils/change-util.ts
+++ b/polygerrit-ui/app/utils/change-util.ts
@@ -90,14 +90,19 @@
// Skip mergeability data.
SKIP_MERGEABLE: 22,
- /**
- * Skip diffstat computation that compute the insertions field (number of lines inserted) and
- * deletions field (number of lines deleted)
- */
+ // Skip diffstat computation that compute the insertions field (number of lines inserted) and
+ // deletions field (number of lines deleted)
SKIP_DIFFSTAT: 23,
- /** Include the evaluated submit requirements for the caller. */
+ // Include the evaluated submit requirements for the caller.
SUBMIT_REQUIREMENTS: 24,
+
+ // Include custom keyed values.
+ CUSTOM_KEYED_VALUES: 25,
+
+ // Include the 'starred' field, that is if the change is starred by the
+ // current user.
+ STAR: 26,
};
export function listChangesOptionsToHex(...args: number[]) {