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

ref: #807 #515 #810
This commit is contained in:
2025-06-09 16:56:02 +09:30
parent 87c5768945
commit 4a484c31a2

View File

@ -5,10 +5,12 @@ from devops.models.git_repository.base import GitRepository
class GitHubRepository(
GitRepository
GitRepository,
):
"""GitHub Repository"""
_is_submodel = True
class Meta(GitRepository.Meta):
verbose_name = 'GitHub Repository'
@ -126,26 +128,3 @@ class GitHubRepository(
# 'created',
# ]
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.github_history import GitHubHistory
history = super().save_history(
before = before,
after = after,
history_model = GitHubHistory
)
return history