Skip to content

Deleting a Repo should delete all Commit Statuses #5926

@jolheiser

Description

@jolheiser
  • Gitea version (or commit ref): current
  • Git version: Any
  • Operating system: All
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

When deleting a repo, currently all commit statuses are being left in the database. Gitea should clean up this table as well when deleting a repo.

Based on the CommitStatus struct having a RepoID here I believe it should be as easy as adding it to the list here

Let me know if this sounds correct and I'd be happy to submit a PR.
I only noticed this when testing the commit status API, there may be more things that can be cleaned up as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions