diff options
author | Luca Milanesio <luca.milanesio@gmail.com> | 2024-01-12 18:56:27 +0000 |
---|---|---|
committer | Luca Milanesio <luca.milanesio@gmail.com> | 2024-01-12 18:56:27 +0000 |
commit | 0877c0688c240057702e3db60cc5cd3e615b8ce9 (patch) | |
tree | 9576e863d9d5922a552eafd125416c80bc7644ad | |
parent | 5fb7efabcef2dc93a2231a946b891aa830e95a17 (diff) | |
parent | e2e7d68c093fd790c60b976736a05d8962a6fe98 (diff) |
Merge branch 'stable-3.7' into stable-3.8
* stable-3.7:
Complete comment identity with the associated serverId in comments
Doc: Fix broken link
Fix typo in some tests
Release-Notes: skip
Change-Id: Idac24072b8aa64f2f5e90bc83336bbe066333c56
7 files changed, 12 insertions, 7 deletions
diff --git a/Documentation/pg-plugin-checks-api.txt b/Documentation/pg-plugin-checks-api.txt index 39e2c9d4f0..968adcc29e 100644 --- a/Documentation/pg-plugin-checks-api.txt +++ b/Documentation/pg-plugin-checks-api.txt @@ -27,7 +27,7 @@ link:https://www.gerritcodereview.com/design-docs/ci-reboot.html[design doc]. Here are some examples of open source plugins that make use of the Checks API: -* link:https://gerrit.googlesource.com/plugins/checks/+/master/gr-checks/plugin.js[Gerrit Checks Plugin] +* link:https://gerrit.googlesource.com/plugins/checks/+/master/web/plugin.ts[Gerrit Checks Plugin] * link:https://chromium.googlesource.com/infra/gerrit-plugins/buildbucket/+/main/web/plugin.ts[Chromium Buildbucket Plugin] * link:https://chromium.googlesource.com/infra/gerrit-plugins/code-coverage/+/main/web/plugin.ts[Chromium Coverage Plugin] diff --git a/java/com/google/gerrit/server/notedb/ChangeNotesParser.java b/java/com/google/gerrit/server/notedb/ChangeNotesParser.java index b6cdfac73a..e06dad3e18 100644 --- a/java/com/google/gerrit/server/notedb/ChangeNotesParser.java +++ b/java/com/google/gerrit/server/notedb/ChangeNotesParser.java @@ -880,7 +880,11 @@ class ChangeNotesParser { noteDbUtil .parseIdent(String.format("%s@%s", c.author.getId(), c.serverId)) - .ifPresent(id -> c.author = new Comment.Identity(id)); + .ifPresent( + id -> { + c.author = new Comment.Identity(id); + c.serverId = noteDbUtil.serverId; + }); humanComments.put(e.getKey(), c); } diff --git a/java/com/google/gerrit/server/notedb/NoteDbUtil.java b/java/com/google/gerrit/server/notedb/NoteDbUtil.java index 5fc9244ea6..b1a4447d30 100644 --- a/java/com/google/gerrit/server/notedb/NoteDbUtil.java +++ b/java/com/google/gerrit/server/notedb/NoteDbUtil.java @@ -36,7 +36,7 @@ import org.eclipse.jgit.util.GitDateFormatter.Format; @Singleton public class NoteDbUtil { - private final String serverId; + final String serverId; private final ExternalIdCache externalIdCache; @Inject diff --git a/javatests/com/google/gerrit/server/notedb/ImportedChangeNotesTest.java b/javatests/com/google/gerrit/server/notedb/ImportedChangeNotesTest.java index 57be12c982..366cbf736e 100644 --- a/javatests/com/google/gerrit/server/notedb/ImportedChangeNotesTest.java +++ b/javatests/com/google/gerrit/server/notedb/ImportedChangeNotesTest.java @@ -133,6 +133,7 @@ public class ImportedChangeNotesTest extends AbstractChangeNotesTest { assertThat(comments).hasSize(1); HumanComment gotComment = comments.entries().asList().get(0).getValue(); assertThat(gotComment.author.getId()).isEqualTo(otherUser.getAccountId()); + assertThat(gotComment.serverId).isEqualTo(LOCAL_SERVER_ID); } @Test diff --git a/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list_test.ts b/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list_test.ts index fa1a6a8372..7c41120618 100644 --- a/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list_test.ts +++ b/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list_test.ts @@ -339,7 +339,7 @@ suite('gr-plugin-list tests', () => { }); }); - suite('list with less then 26 plugins', () => { + suite('list with less than 26 plugins', () => { setup(async () => { plugins = createPluginObjectList(25); stubRestApi('getPlugins').returns(Promise.resolve(plugins)); diff --git a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_test.ts b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_test.ts index 391a22aeab..5e25b33ab6 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_test.ts +++ b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_test.ts @@ -2089,7 +2089,7 @@ suite('gr-repo-detail-list', () => { }); }); - suite('list with less then 25 branches', () => { + suite('list with less than 25 branches', () => { setup(async () => { branches = createBranchesList(25); stubRestApi('getRepoBranches').returns(Promise.resolve(branches)); @@ -2226,7 +2226,7 @@ suite('gr-repo-detail-list', () => { }); }); - suite('list with less then 25 tags', () => { + suite('list with less than 25 tags', () => { setup(async () => { tags = createTagsList(25); stubRestApi('getRepoTags').returns(Promise.resolve(tags)); diff --git a/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_test.ts b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_test.ts index b80db4c349..36674f5081 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_test.ts +++ b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_test.ts @@ -464,7 +464,7 @@ suite('gr-repo-list tests', () => { }); }); - suite('list with less then 25 repos', () => { + suite('list with less than 25 repos', () => { setup(async () => { repos = createRepoList('test', 25); stubRestApi('getRepos').returns(Promise.resolve(repos)); |