Rename remote to forge (#1357)

As of #745

Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
qwerty287
2022-11-05 00:35:06 +01:00
committed by GitHub
parent 2ee75dbceb
commit 3372d1a87c
135 changed files with 750 additions and 698 deletions

View File

@@ -38,7 +38,7 @@ func GetSelf(c *gin.Context) {
func GetFeed(c *gin.Context) {
_store := store.FromContext(c)
remote := server.Config.Services.Remote
forge := server.Config.Services.Forge
user := session.User(c)
latest, _ := strconv.ParseBool(c.Query("latest"))
@@ -55,10 +55,10 @@ func GetFeed(c *gin.Context) {
config := ToConfig(c)
sync := shared.Syncer{
Remote: remote,
Store: _store,
Perms: _store,
Match: shared.NamespaceFilter(config.OwnersWhitelist),
Forge: forge,
Store: _store,
Perms: _store,
Match: shared.NamespaceFilter(config.OwnersWhitelist),
}
if err := sync.Sync(c, user, server.Config.FlatPermissions); err != nil {
log.Debug().Msgf("sync error: %s: %s", user.Login, err)
@@ -87,7 +87,7 @@ func GetFeed(c *gin.Context) {
func GetRepos(c *gin.Context) {
_store := store.FromContext(c)
remote := server.Config.Services.Remote
forge := server.Config.Services.Forge
user := session.User(c)
all, _ := strconv.ParseBool(c.Query("all"))
@@ -104,10 +104,10 @@ func GetRepos(c *gin.Context) {
config := ToConfig(c)
sync := shared.Syncer{
Remote: remote,
Store: _store,
Perms: _store,
Match: shared.NamespaceFilter(config.OwnersWhitelist),
Forge: forge,
Store: _store,
Perms: _store,
Match: shared.NamespaceFilter(config.OwnersWhitelist),
}
if err := sync.Sync(c, user, server.Config.FlatPermissions); err != nil {