Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Forgefriends Forgefriends
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • forgefriendsforgefriends
  • ForgefriendsForgefriends
  • Merge requests
  • !34

Draft: fix CheckRepoStats and reuse it during migration

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Loïc Dachary requested to merge wip-stats into base-development Jan 12, 2022
  • Overview 15
  • Commits 5
  • Pipelines 7
  • Changes 10

PR: https://github.com/go-gitea/gitea/pull/18264


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.

Edited Jan 16, 2022 by Loïc Dachary
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wip-stats