Skip to content

GitLab

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

Closed
Created Jan 12, 2022 by Loïc Dachary@dacharyOwner
  • Report abuse
Report abuse

Draft: fix CheckRepoStats and reuse it during migration

  • 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
Reviewer
Request review from
Time tracking
Source branch: wip-stats