Skip to content
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

Remove redundant call to UpdateRepoStats during migration (#18591) #18794

Merged

Commits on Feb 17, 2022

  1. remove redundant call to UpdateRepoStats during migration (go-gitea#1…

    …8591)
    
    There is no need to call UpdateRepoStats in the InsertIssues and
    InsertPullRequests function. They are only called during migration by
    the CreateIssues and CreateReviews methods of the gitea uploader.
    
    The UpdateRepoStats function will be called by the Finish method of
    the gitea uploader after all reviews and issues are inserted. Calling
    it before is therefore redundant and the associated SQL requests are
    not cheap.
    
    The statistics tests done after inserting an issue or a pull request
    are also removed. They predate the implementation of UpdateRepoStats,
    back when the calculation of the statistics was an integral part of
    the migration function. The UpdateRepoStats is now tested
    independantly and these tests are no longer necessary.
    
    Signed-off-by: singuliere <[email protected]>
    
    Co-authored-by: zeripath <[email protected]>
    Co-authored-by: 6543 <[email protected]>
    Co-authored-by: Lunny Xiao <[email protected]>
    Co-authored-by: wxiaoguang <[email protected]>
    5 people committed Feb 17, 2022
    Configuration menu
    Copy the full SHA
    c91b3f5 View commit details
    Browse the repository at this point in the history