nestjs-api-example
nestjs-api-example copied to clipboard
fix(deps): update dependency reflect-metadata to ^0.2.0
Like on GitHub. In repository: ex. top commiters In user: ex. commits by day, daily average of commits, streak
Thanks your feedback, these are planned around 0.8
Is this still planned for 0.8 or is it getting pushed to a later version?
Apparently pushed to later version, sorry!
One of these days I might get round to properly learning go and giving a hand.
Good for you!
But you might want to choose a easier one...
I've had a look at this and it seems almost terribly simple to implement (with regards to go-git-module). Performance-wise (at least for git
-commands) I don't see any reason to cache it either to be honest...
(all time-related things are ran on the gogs-repo, on a Core i5-3317U @ 1.70GHz )
Top Commtters
$ time git log --format=format:%an | sort | uniq -c | sort -r -n | head -5
1468 Unknwon
573 Unknown
385 无闻
197 Lunny Xiao
146 FuXiaoHei
[...]
real 0m0.115s
user 0m0.060s
sys 0m0.017s
which is easy to parse:
var (
num int
commiter string
)
fmt.Sscanf(command.StdOut, "[ ]+%d %s", &num, &commiter)
$ time git log --format=format:%an | sort | uniq -c | sort -r -n | head -20
[...]
Though for Gogs we'd need to do sort|uniq|sort|head
in Golang, no clue about the performance-hit there)
Commit counting per User (per day, daily average, and streaks)
$ time git --no-pager log --author="Unknwon" --format=%aI
2016-05-12T14:32:28-04:00
2016-05-12T14:31:06-04:00
2016-05-11T12:19:26-04:00
2016-05-11T12:17:52-04:00
[...]
real 0m0.075s
user 0m0.070s
sys 0m0.000s
That format is ISO8601, so it's easy to parse with
commitTime := time.Parse(input, time.RFC3339)
(RFC3339 is a profile of ISO8601, git
uses RFC3339 but say ISO8601...)
Sorting time.Time
is relatively simple as well
Like with the previous command, we still need to parse and sort in Golang, no clue how that will impact performance, but git
sure isn't the bottleneck :laughing:
Hm, looks like developer support for this feature is low but I'd like to add my support for getting this in as well!
First off, thanks Unknwon, great project!
The problem with low priority items... they never get to the top of the list.
Like a blown light bulb in a shopping centre, it's only one, and there are always bigger issues, broken doors, heating systems, etc. it never gets replaced.
Sometime, this will just have to get shunted to the top of the list if it's ever going to get done.
Got to say there are higher priority items that I'd like from gogs too, but would suggest a firm milestone being set, so this one gets done.
I'd like to bump this thread too, just as a reminder that it would be very useful to some of us. I understand there are higher priority items on to-do list, but... It has been 4 years since this request and I bet a whole bunch of high-priority items have come and gone since then, without this ever being touched. Seeing as bkcsoft demonstrated above how easy it is to implement, I would like to remind that this is here.
+1
+1
+1
I'm creating a PR, the changes are creating 3 pages:
- Contributors Page
- Commits Page
- Code Frequency Page
Here are the comparisons on GIthub vs Gogs:
Contributors Page
There are many things that can be improved in this page:
- Cache, I think this page can be cached to make it faster
- I don't know how to make the list of user having 2 columns instead of 1 (I'm bad with CSS)
- Can select range by dragging on the main chart (https://stackoverflow.com/questions/42855738/how-do-i-selecting-a-date-range-like-onclick-but-drag-select)
- The header formatting on list of user contribution, especially for
21 commits 38 ++ 10 --
- Not sure how to implement comma on 1000's, for example
4000 commits
, in GIthub it will be written4,000 commits
, not sure the implementation for different language formatting (should pass string or integer in the template)
Commits Page
Code Frequency Page