You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/services/repository
Şahin Akkaya 21331be30c
Implement contributors graph (#27882)
Continuation of https://github.com/go-gitea/gitea/pull/25439. Fixes #847

Before:
<img width="1296" alt="image"
src="https://github.com/go-gitea/gitea/assets/32161460/24571ac8-b254-43c9-b178-97340f0dc8a9">

----
After:
<img width="1296" alt="image"
src="https://github.com/go-gitea/gitea/assets/32161460/c60b2459-9d10-4d42-8d83-d5ef0f45bf94">

---
#### Overview
This is the implementation of a requested feature: Contributors graph
(#847)

It makes Activity page a multi-tab page and adds a new tab called
Contributors. Contributors tab shows the contribution graphs over time
since the repository existed. It also shows per user contribution graphs
for top 100 contributors. Top 100 is calculated based on the selected
contribution type (commits, additions or deletions).

---
#### Demo
(The demo is a bit old but still a good example to show off the main
features)

<video src="https://github.com/go-gitea/gitea/assets/32161460/9f68103f-8145-4cc2-94bc-5546daae7014" controls width="320" height="240">
  <a href="https://github.com/go-gitea/gitea/assets/32161460/9f68103f-8145-4cc2-94bc-5546daae7014">Download</a>
</video>


#### Features:

- Select contribution type (commits, additions or deletions)
- See overall and per user contribution graphs for the selected
contribution type
- Zoom and pan on graphs to see them in detail
- See top 100 contributors based on the selected contribution type and
selected time range
- Go directly to users' profile by clicking their name if they are
registered gitea users
- Cache the results so that when the same repository is visited again
fetching data will be faster


---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: hiifong <i@hiif.ong>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: yp05327 <576951401@qq.com>
12 months ago
..
archiver Simplify how git repositories are opened (#28937) 1 year ago
files Extract linguist code to method (#29168) 12 months ago
adopt.go Simplify how git repositories are opened (#28937) 1 year ago
adopt_test.go Use more specific test methods (#24265) 2 years ago
avatar.go Improve avatar uploading / resizing / compressing, remove Fomantic card module (#24653) 2 years ago
avatar_test.go Use context parameter in services/repository (#23186) 2 years ago
branch.go Simplify how git repositories are opened (#28937) 1 year ago
cache.go Always enable caches (#28527) 1 year ago
check.go Update tool dependencies (#29030) 1 year ago
collaboration.go Fix `DeleteCollaboration` transaction behaviour (#28886) 1 year ago
collaboration_test.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
commit.go Show branches and tags that contain a commit (#25180) 2 years ago
contributors_graph.go Implement contributors graph (#27882) 12 months ago
contributors_graph_test.go Implement contributors graph (#27882) 12 months ago
create.go Simplify how git repositories are opened (#28937) 1 year ago
create_test.go bump to use go 1.22 (#29119) 12 months ago
delete.go Use db.Find instead of writing methods for every object (#28084) 1 year ago
delete_test.go Delete repos of org when purge delete user (#27273) 1 year ago
fork.go Simplify how git repositories are opened (#28937) 1 year ago
fork_test.go Add option to prohibit fork if user reached maximum limit of repositories (#21848) 2 years ago
hooks.go Simplify how git repositories are opened (#28937) 1 year ago
lfs.go Simplify how git repositories are opened (#28937) 1 year ago
lfs_test.go Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods (#28220) 1 year ago
main_test.go make writing main test easier (#27270) 1 year ago
push.go Simplify how git repositories are opened (#28937) 1 year ago
repository.go Remove unnecessary parameter (#27671) 1 year ago
repository_test.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
review.go Use context parameter in services/repository (#23186) 2 years ago
review_test.go Use context parameter in services/repository (#23186) 2 years ago
setting.go Fix an actions schedule bug (#28942) 1 year ago
template.go Move notification interface to services layer (#26915) 1 year ago
transfer.go Move some repository transfer functions to service layer (#28855) 1 year ago
transfer_test.go Move some repository transfer functions to service layer (#28855) 1 year ago