Skip to content

Commit

Permalink
added LFS switch for gitea
Browse files Browse the repository at this point in the history
  • Loading branch information
cooperspencer committed Oct 4, 2023
1 parent 22ed5b6 commit 4641449
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions conf.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ destination:
url: http(s)://url-to-gitea
createorg: true # creates an organization if it doesn't exist already, if no user is set it creates an organization with the name of the original author
mirrorinterval: 2h0m0s # interval to pull changes from source repo
lfs: false # trigger to enable lfs on gitea
visibility:
repositories: private # private, public, default: private
organizations: private # private, limited, public, default: private
Expand Down
2 changes: 2 additions & 0 deletions gitea/gitea.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ func Backup(r types.Repo, d types.GenRepo, dry bool) bool {
Private: repovisibility,
Description: r.Description,
MirrorInterval: d.MirrorInterval,
LFS: d.LFS,
}

if r.Token == "" {
Expand All @@ -123,6 +124,7 @@ func Backup(r types.Repo, d types.GenRepo, dry bool) bool {
Private: repovisibility,
Description: r.Description,
MirrorInterval: d.MirrorInterval,
LFS: d.LFS,
}
}

Expand Down
1 change: 1 addition & 0 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ type GenRepo struct {
Force bool `yaml:"force"`
Contributed bool `yaml:"contributed"`
MirrorInterval string `yaml:"mirrorinterval"`
LFS bool `yaml:"lfs"`
}

// Visibility struct
Expand Down

0 comments on commit 4641449

Please sign in to comment.