[tools] Consider today for gerrit-stats and snippets
When you do not specify the --before and --after flags, the tools should consider the window of [N-days-ago .. now]. 'Before' is not inclusive, so push it forward 24 hours to include today. Change-Id: I4c04bcb3c318a83091aeebacddd67e47170508ae Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/134500 Kokoro: Kokoro <noreply+kokoro@google.com> Auto-Submit: Ben Clayton <bclayton@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
409483d2f0
commit
986e7ccbe4
|
@ -80,7 +80,7 @@ func run() error {
|
|||
return fmt.Errorf("Couldn't parse before date: %w", err)
|
||||
}
|
||||
} else {
|
||||
before = time.Now()
|
||||
before = time.Now().Add(time.Hour * 24)
|
||||
}
|
||||
if *afterFlag != "" {
|
||||
after, err = time.Parse(yyyymmdd, *afterFlag)
|
||||
|
|
|
@ -77,7 +77,7 @@ func run() error {
|
|||
return fmt.Errorf("Couldn't parse before date: %w", err)
|
||||
}
|
||||
} else {
|
||||
before = time.Now()
|
||||
before = time.Now().Add(time.Hour * 24)
|
||||
}
|
||||
if *afterFlag != "" {
|
||||
after, err = time.Parse(yyyymmdd, *afterFlag)
|
||||
|
@ -113,8 +113,8 @@ func run() error {
|
|||
for _, project := range []string{"tint", "dawn"} {
|
||||
if changes := changesByProject[project]; len(changes) > 0 {
|
||||
fmt.Println("##", strings.Title(project))
|
||||
for _, change := range changes {
|
||||
fmt.Println(change)
|
||||
for i := len(changes) - 1; i >= 0; i-- {
|
||||
fmt.Println(changes[i])
|
||||
}
|
||||
fmt.Println()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue