feat(devops): Switch GitLabGitRepository model to inherit from CenturionModel

ref: #807 #515 #809
This commit is contained in:
2025-06-09 16:56:20 +09:30
parent 4a484c31a2
commit 2ffb93a630

View File

@ -5,10 +5,13 @@ from devops.models.git_repository.base import GitRepository
class GitLabRepository(
GitRepository
GitRepository,
):
"""GitLab Repository"""
_is_submodel = True
class Meta(GitRepository.Meta):
verbose_name = 'GitLab Repository'
@ -82,27 +85,3 @@ class GitLabRepository(
"sections": []
},
]
def get_url_kwargs_notes(self) -> dict:
"""Fetch the URL kwargs for model notes
Returns:
dict: notes kwargs required for generating the URL with `reverse`
"""
return {
'model_id': self.id
}
def save_history(self, before: dict, after: dict) -> bool:
from devops.models.git_repository.gitlab_history import GitlabHistory
history = super().save_history(
before = before,
after = after,
history_model = GitlabHistory
)
return history