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

Fix CheckRepoStats and reuse it during migration #18264

Merged
merged 6 commits into from
Jan 17, 2022

Commits on Jan 17, 2022

  1. fix CheckRepoStats and reuse it during migration

    The CheckRepoStats function missed the following counters:
    
    * label num_closed_issues & num_closed_pulls
    * milestone num_closed_issues & num_closed_pulls
    
    The update SQL statements for updating the repository
    num_closed_issues & num_closed_pulls fields were repeated in three
    functions (repo.CheckRepoStats, migrate.insertIssues and
    models.Issue.updateClosedNum) and were moved to a single helper.
    
    The UpdateRepoStats is implemented and called in the Finish migration method
    so that it happens immediately instead of wating for the
    CheckRepoStats to run.
    
    Signed-off-by: Loïc Dachary <loic@dachary.org>
    Loïc Dachary authored and realaravinth committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    34288d4 View commit details
    Browse the repository at this point in the history
  2. use context.Context as function arguments instead of db.Engine

    Signed-off-by: Loïc Dachary <loic@dachary.org>
    Loïc Dachary authored and realaravinth committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    26b2ff7 View commit details
    Browse the repository at this point in the history
  3. UpdateRepoStats must be run from InsertIssues not insertIssue

    Loïc Dachary authored and realaravinth committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    099c7cf View commit details
    Browse the repository at this point in the history
  4. TRUE/FALSE are not valid literals for mssql

    Loïc Dachary authored and realaravinth committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    d606fba View commit details
    Browse the repository at this point in the history
  5. also update stats when restoring pull requests

    Signed-off-by: Loïc Dachary <loic@dachary.org>
    Loïc Dachary authored and realaravinth committed Jan 17, 2022
    Configuration menu
    Copy the full SHA
    c19bfa3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7eadc53 View commit details
    Browse the repository at this point in the history