mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 19:28:17 +00:00
Rename remote
to forge
(#1357)
As of #745 Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
@@ -62,7 +62,7 @@ func RunCron(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
repo, newPipeline, err := cronScheduler.CreatePipeline(c, _store, server.Config.Services.Remote, cron)
|
||||
repo, newPipeline, err := cronScheduler.CreatePipeline(c, _store, server.Config.Services.Forge, cron)
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "Error creating pipeline for cron %q. %s", id, err)
|
||||
return
|
||||
@@ -82,7 +82,7 @@ func PostCron(c *gin.Context) {
|
||||
repo := session.Repo(c)
|
||||
user := session.User(c)
|
||||
store := store.FromContext(c)
|
||||
remote := server.Config.Services.Remote
|
||||
forge := server.Config.Services.Forge
|
||||
|
||||
in := new(model.Cron)
|
||||
if err := c.Bind(in); err != nil {
|
||||
@@ -109,8 +109,8 @@ func PostCron(c *gin.Context) {
|
||||
cron.NextExec = nextExec.Unix()
|
||||
|
||||
if in.Branch != "" {
|
||||
// check if branch exists on remote
|
||||
_, err := remote.BranchHead(c, user, repo, in.Branch)
|
||||
// check if branch exists on forge
|
||||
_, err := forge.BranchHead(c, user, repo, in.Branch)
|
||||
if err != nil {
|
||||
c.String(400, "Error inserting cron. branch not resolved: %s", err)
|
||||
return
|
||||
@@ -129,7 +129,7 @@ func PatchCron(c *gin.Context) {
|
||||
repo := session.Repo(c)
|
||||
user := session.User(c)
|
||||
store := store.FromContext(c)
|
||||
remote := server.Config.Services.Remote
|
||||
forge := server.Config.Services.Forge
|
||||
|
||||
id, err := strconv.ParseInt(c.Param("cron"), 10, 64)
|
||||
if err != nil {
|
||||
@@ -150,8 +150,8 @@ func PatchCron(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
if in.Branch != "" {
|
||||
// check if branch exists on remote
|
||||
_, err := remote.BranchHead(c, user, repo, in.Branch)
|
||||
// check if branch exists on forge
|
||||
_, err := forge.BranchHead(c, user, repo, in.Branch)
|
||||
if err != nil {
|
||||
c.String(400, "Error inserting cron. branch not resolved: %s", err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user