Skip to content

Commit

Permalink
refactor: create re-usable CompileAndPublish function (#1063)
Browse files Browse the repository at this point in the history
* init commit

* comments and prnum logic

* fix issue comment test

* add a comment to trigger a new commit

* renaming

* more renaming

* enqueue take item instead of 3 resources

* fix error return for bad route and change create form
  • Loading branch information
ecrupper committed Mar 25, 2024
1 parent 0df024e commit 8a5955d
Show file tree
Hide file tree
Showing 11 changed files with 643 additions and 1,312 deletions.
7 changes: 3 additions & 4 deletions api/build/approve.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/go-vela/server/router/middleware/repo"
"github.com/go-vela/server/router/middleware/user"
"github.com/go-vela/server/util"
"github.com/go-vela/types"
"github.com/go-vela/types/constants"
"github.com/sirupsen/logrus"
)
Expand Down Expand Up @@ -126,13 +127,11 @@ func ApproveBuild(c *gin.Context) {
}

// publish the build to the queue
go PublishToQueue(
go Enqueue(
ctx,
queue.FromGinContext(c),
database.FromContext(c),
b,
r,
owner,
types.ToItem(b, r, owner),
b.GetHost(),
)

Expand Down
Loading

0 comments on commit 8a5955d

Please sign in to comment.