Feature/branch details (#1876)

Enrich branch overview with more details like last committer and ahead/behind commits. Since calculating this information is pretty intense, we request it in chunks to prevent very long loading times. Also we cache the results in frontend and backend.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
This commit is contained in:
Eduard Heimbuch
2021-12-01 14:19:18 +01:00
committed by GitHub
parent ce2eae1843
commit 9cc134f5a8
59 changed files with 1933 additions and 154 deletions

View File

@@ -22,7 +22,8 @@
* SOFTWARE.
*/
import { Embedded, HalRepresentationWithEmbedded, Links } from "./hal";
import { Person } from ".";
import { Embedded, HalRepresentation, HalRepresentationWithEmbedded, Links } from "./hal";
type EmbeddedBranches = {
branches: Branch[];
@@ -35,10 +36,23 @@ export type Branch = {
revision: string;
defaultBranch?: boolean;
lastCommitDate?: string;
lastCommitter?: Person;
stale?: boolean;
_links: Links;
};
export type BranchDetails = HalRepresentation & {
branchName: string;
changesetsAhead?: number;
changesetsBehind?: number;
};
type EmbeddedBranchDetails = {
branchDetails: BranchDetails[];
} & Embedded;
export type BranchDetailsCollection = HalRepresentationWithEmbedded<EmbeddedBranchDetails>;
export type BranchCreation = {
name: string;
parent: string;