From c05a8abc762f868e67dd131d34f45218a0fb95ab Mon Sep 17 00:00:00 2001 From: zeripath Date: Sun, 8 Nov 2020 17:21:54 +0000 Subject: Multiple GitGraph improvements: Exclude PR heads, Add branch/PR links, Show only certain branches, (#12766) * Multiple GitGraph improvements. Add backend support for excluding PRs, selecting branches and files. Fix #10327 Signed-off-by: Andrew Thornton * as per @silverwind Signed-off-by: Andrew Thornton * as per @silverwind Signed-off-by: Andrew Thornton * Only show refs in dropdown we display on the graph Signed-off-by: Andrew Thornton * as per @silverwind Signed-off-by: Andrew Thornton * use flexbox for ui header Signed-off-by: Andrew Thornton * Move Hide Pull Request button to the dropdown Signed-off-by: Andrew Thornton * Add SHA and user pictures Signed-off-by: Andrew Thornton * fix test Signed-off-by: Andrew Thornton * fix test 2 Signed-off-by: Andrew Thornton * fixes * async * more tweaks * use tabs in tmpl Signed-off-by: Andrew Thornton * remove commented thing Signed-off-by: Andrew Thornton * fix linting Signed-off-by: Andrew Thornton * Update web_src/js/features/gitgraph.js Co-authored-by: silverwind * graph tweaks * more tweaks * add title Signed-off-by: Andrew Thornton * fix loading indicator z-index and position Co-authored-by: silverwind Co-authored-by: techknowlogick Co-authored-by: Lauris BH --- modules/gitgraph/graph_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/gitgraph/graph_test.go') diff --git a/modules/gitgraph/graph_test.go b/modules/gitgraph/graph_test.go index ca9d653cee..c2726a731a 100644 --- a/modules/gitgraph/graph_test.go +++ b/modules/gitgraph/graph_test.go @@ -22,7 +22,7 @@ func BenchmarkGetCommitGraph(b *testing.B) { defer currentRepo.Close() for i := 0; i < b.N; i++ { - graph, err := GetCommitGraph(currentRepo, 1, 0) + graph, err := GetCommitGraph(currentRepo, 1, 0, false, nil, nil) if err != nil { b.Error("Could get commit graph") } @@ -34,7 +34,7 @@ func BenchmarkGetCommitGraph(b *testing.B) { } func BenchmarkParseCommitString(b *testing.B) { - testString := "* DATA:|4e61bacab44e9b4730e44a6615d04098dd3a8eaf|2016-12-20 21:10:41 +0100|Kjell Kvinge|kjell@kvinge.biz|4e61bac|Add route for graph" + testString := "* DATA:|4e61bacab44e9b4730e44a6615d04098dd3a8eaf|2016-12-20 21:10:41 +0100|4e61bac|Add route for graph" parser := &Parser{} parser.Reset() @@ -44,7 +44,7 @@ func BenchmarkParseCommitString(b *testing.B) { if err := parser.AddLineToGraph(graph, 0, []byte(testString)); err != nil { b.Error("could not parse teststring") } - if graph.Flows[1].Commits[0].Author != "Kjell Kvinge" { + if graph.Flows[1].Commits[0].Rev != "4e61bacab44e9b4730e44a6615d04098dd3a8eaf" { b.Error("Did not get expected data") } } @@ -244,7 +244,7 @@ func TestParseGlyphs(t *testing.T) { } func TestCommitStringParsing(t *testing.T) { - dataFirstPart := "* DATA:|4e61bacab44e9b4730e44a6615d04098dd3a8eaf|2016-12-20 21:10:41 +0100|Author|user@mail.something|4e61bac|" + dataFirstPart := "* DATA:|4e61bacab44e9b4730e44a6615d04098dd3a8eaf|2016-12-20 21:10:41 +0100|4e61bac|" tests := []struct { shouldPass bool testName string -- cgit v1.2.3