mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-12-21 15:59:48 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user