forked from importers/git-importer
Move git commit message creation into class
This commit is contained in:
parent
9114c2fff8
commit
f1457e8f8e
@ -51,6 +51,10 @@ class DBRevision:
|
|||||||
return self.package < other.package
|
return self.package < other.package
|
||||||
return self.rev < other.rev
|
return self.rev < other.rev
|
||||||
|
|
||||||
|
def git_commit_message(self):
|
||||||
|
# TODO: Normalize better the commit message
|
||||||
|
return f"{self.comment}\n\n{self}"
|
||||||
|
|
||||||
def as_dict(self):
|
def as_dict(self):
|
||||||
"""Return a dict we can put into YAML for test cases"""
|
"""Return a dict we can put into YAML for test cases"""
|
||||||
ret = {
|
ret = {
|
||||||
|
@ -144,8 +144,7 @@ class GitExporter:
|
|||||||
flat.user.realname,
|
flat.user.realname,
|
||||||
flat.user.email,
|
flat.user.email,
|
||||||
flat.commit.commit_time,
|
flat.commit.commit_time,
|
||||||
# TODO: Normalize better the commit message
|
flat.commit.git_commit_message(),
|
||||||
f"{flat.commit.comment}\n\n{flat.commit}",
|
|
||||||
parents=parents,
|
parents=parents,
|
||||||
)
|
)
|
||||||
flat.commit.git_commit = commit
|
flat.commit.git_commit = commit
|
||||||
|
Loading…
Reference in New Issue
Block a user