-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix forked repo has no icon and language stat. #10791
Conversation
Another solution is copy the older repo's language statistic from data base. But is a little bit troublesome. and re-index can be more accurate. There is an unsolved issue: the original repo and the forked repo has different size on the information bar. It has no influence, but is very strange. |
Codecov Report
@@ Coverage Diff @@
## master #10791 +/- ##
==========================================
- Coverage 43.56% 43.50% -0.07%
==========================================
Files 589 597 +8
Lines 82674 83972 +1298
==========================================
+ Hits 36020 36534 +514
- Misses 42183 42921 +738
- Partials 4471 4517 +46
Continue to review full report at Codecov.
|
It would be better and faster just to copy stats from original repo |
Thanks your suggestion, I will try another way. |
Size could probably be different because git mirror will not copy all refs but that just wild guess |
One more question, thank you very much. |
xorm operations are synchronous |
Thanks, i will have a try. |
All the test is passing, it is ready to review. |
Thanks the advice from lunny and 6543.
Modified as suggested by 6543.
simplify the function.
update the indexer after the loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 😅
@L0veSunshine thanks for your work |
Thanks for your guidence. I am also very glad to contribute to the gitea project. |
Thanks.
I am sorry i was newer in github😂. i had resolve it. |
@lunny this need your review |
Make lgtm work |
* Update header.tmpl * Update _repository.less * Update pull.go * Update indexer.go * Update pull.go * Update pull.go * Update indexer.go * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat Thanks the advice from lunny and 6543. * fix forked repo doesn't have language stat Modified as suggested by 6543. * fix forked repo doesn't have language stat simplify the function. * fix forked repo doesn't have language stat update the indexer after the loop Co-authored-by: techknowlogick <[email protected]> Co-authored-by: Lauris BH <[email protected]>
Fix #10790
I'm not sure if sleep 1.5 seconds is a good method, but this method is simple enough, If the language stat indexer can't analysis code and write the result to database in 1.5 second, After you fresh the page the language stat will display.