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/routers/web/repo
Ş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
..
actions Refactor locale&string&template related code (#29165) 12 months ago
setting Change webhook-type in create-view (#29114) 12 months ago
activity.go Implement contributors graph (#27882) 12 months ago
attachment.go Even more `db.DefaultContext` refactor (#27352) 1 year ago
blame.go Extract linguist code to method (#29168) 12 months ago
branch.go Adjust object format interface (#28469) 1 year ago
cherry_pick.go Refactor locale&string&template related code (#29165) 12 months ago
commit.go Simplify how git repositories are opened (#28937) 1 year ago
compare.go Refactor locale&string&template related code (#29165) 12 months ago
contributors.go Implement contributors graph (#27882) 12 months ago
download.go Less naked returns (#25713) 2 years ago
editor.go Refactor locale&string&template related code (#29165) 12 months ago
editor_test.go Simplify how git repositories are opened (#28937) 1 year ago
find.go Implement FSFE REUSE for golang files (#21840) 2 years ago
githttp.go Some refactor for git http (#28995) 1 year ago
githttp_test.go Fix http protocol auth (#27875) 1 year ago
helper.go Improve tree not found page (#26570) 1 year ago
helper_test.go Make web context initialize correctly for different cases (#26726) 1 year ago
issue.go Refactor locale&string&template related code (#29165) 12 months ago
issue_content_history.go Refactor locale&string&template related code (#29165) 12 months ago
issue_dependency.go Upgrade to golangci-lint@v1.55.0 (#27756) 1 year ago
issue_label.go Even more `db.DefaultContext` refactor (#27352) 1 year ago
issue_label_test.go Refactor locale&string&template related code (#29165) 12 months ago
issue_lock.go Penultimate round of `db.DefaultContext` refactor (#27414) 1 year ago
issue_pin.go Fix missing check (#28406) 1 year ago
issue_stopwatch.go Final round of `db.DefaultContext` refactor (#27587) 1 year ago
issue_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
issue_timetrack.go Final round of `db.DefaultContext` refactor (#27587) 1 year ago
issue_watch.go Introduce htmx and use it to avoid full page load on `Subscribe` and `Follow` (#28908) 1 year ago
main_test.go make writing main test easier (#27270) 1 year ago
middlewares.go Improve user experience for outdated comments (#29050) 1 year ago
migrate.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
milestone.go Refactor issue template parsing and fix API endpoint (#29069) 12 months ago
packages.go Fix the display of org level badges (#26504) 1 year ago
patch.go Refactor locale&string&template related code (#29165) 12 months ago
projects.go Refactor locale&string&template related code (#29165) 12 months ago
projects_test.go Move web/api context related testing function into a separate package (#26859) 1 year ago
pull.go Refactor locale&string&template related code (#29165) 12 months ago
pull_review.go Refactor locale&string&template related code (#29165) 12 months ago
pull_review_test.go Improve user experience for outdated comments (#29050) 1 year ago
release.go Rework markup link rendering (#26745) 1 year ago
release_test.go Move more functions to db.Find (#28419) 1 year ago
render.go Preserve BOM in web editor (#28935) 1 year ago
repo.go Don't do a full page load when clicking `Watch` or `Star` (#29001) 1 year ago
search.go Refactor indexer (#25174) 2 years ago
topic.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
treelist.go Implement FSFE REUSE for golang files (#21840) 2 years ago
view.go Refactor locale&string&template related code (#29165) 12 months ago
view_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
wiki.go Refactor locale&string&template related code (#29165) 12 months ago
wiki_test.go Simplify how git repositories are opened (#28937) 1 year ago