Properly abstract deployment asset downlod
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"errors"
|
||||
"log"
|
||||
"path/filepath"
|
||||
"quay/app/github"
|
||||
"quay/app/gitprovider"
|
||||
"quay/app/models"
|
||||
"quay/app/repository"
|
||||
"quay/internal/envconfig"
|
||||
@@ -129,7 +129,14 @@ func (h *DeploySiteHandler) PostDeploy(c fiber.Ctx) error {
|
||||
})
|
||||
}
|
||||
|
||||
res, err := github.FetchAndDeployBranch(
|
||||
provider, err := gitprovider.NewProvider(gitServer.Type, gitServer.Protocol, gitServer.BaseUrl)
|
||||
if err != nil {
|
||||
return c.Status(400).JSON(models.APIError{
|
||||
Message: "Unsupported git provider: " + gitServer.Type,
|
||||
})
|
||||
}
|
||||
|
||||
res, err := provider.FetchAndDeployBranch(
|
||||
site.Owner,
|
||||
site.Repository,
|
||||
site.Branch,
|
||||
|
||||
Reference in New Issue
Block a user