save git commit msg and repo namespace

This commit is contained in:
Jeff Carr 2025-01-29 10:02:08 -06:00
parent aa06450042
commit b412e50df0
2 changed files with 13 additions and 8 deletions

View File

@ -159,6 +159,7 @@ func (p *Patchset) addPatchFiles(repo *gitpb.Repo) error {
patch.Data = data
patch.parseData()
patch.StartHash = repo.DevelHash()
patch.RepoNamespace = repo.GetGoPath()
if p.Patches == nil {
p.Patches = new(Patches)
}
@ -182,6 +183,8 @@ func (p *Patch) parseData() string {
switch fields[0] {
case "From":
p.CommitHash = fields[1]
case "Subject:":
p.Comment = line
case "diff":
p.Files = append(p.Files, line)
}

View File

@ -14,6 +14,8 @@ message Patch {
string commitHash = 8; // the git commit hash of this patch
string startHash = 9; // the start commit hash
repeated string Files = 10; // the filenames this patch changes
string comment = 11; // the git commit message (in patch form)
string repoNamespace = 12; // the base repo git URL
}
message Patches { // `autogenpb:marshal`