Skip to content

Commit

Permalink
capture blob id when listing blobs for gitea
Browse files Browse the repository at this point in the history
  • Loading branch information
bradrydzewski committed Apr 7, 2022
1 parent cc4578a commit a791b0d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 485 deletions.
3 changes: 2 additions & 1 deletion scm/driver/gitea/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func (s *contentService) List(ctx context.Context, repo, path, ref string, _ scm
type content struct {
Path string `json:"path"`
Type string `json:"type"`
Sha string `json:"sha"`
}

func convertContentInfoList(from []*content) []*scm.ContentInfo {
Expand All @@ -59,7 +60,7 @@ func convertContentInfoList(from []*content) []*scm.ContentInfo {
}

func convertContentInfo(from *content) *scm.ContentInfo {
to := &scm.ContentInfo{Path: from.Path}
to := &scm.ContentInfo{Path: from.Path, BlobID: from.Sha}
switch from.Type {
case "file":
to.Kind = scm.ContentKindFile
Expand Down
Loading

0 comments on commit a791b0d

Please sign in to comment.