Skip to content

Commit

Permalink
feat: enable debug transaction until operational
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel-Haeberli committed Aug 15, 2023
1 parent 83d1d14 commit 94ba679
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions momentum-core/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (

const MOMENTUM_ROOT = "momentum-root"

const TRANSACTION_MODE = gittransaction.DEBUG

const MOMENTUM_GIT_USER = "MOMENTUM_GIT_USER"
const MOMENTUM_GIT_EMAIL = "MOMENTUM_GIT_EMAIL"
const MOMENTUM_GIT_TOKEN = "MOMENTUM_GIT_TOKEN"
Expand Down
2 changes: 1 addition & 1 deletion momentum-core/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module momentum-core
go 1.20

require (
github.com/Joel-Haeberli/git-transaction v0.1.3
github.com/Joel-Haeberli/git-transaction v0.1.4
github.com/gin-gonic/gin v1.9.1
github.com/google/uuid v1.3.0
github.com/json-iterator/go v1.1.12
Expand Down
2 changes: 2 additions & 0 deletions momentum-core/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ github.com/Joel-Haeberli/git-transaction v0.1.2 h1:xXIgHFKfaZw8Dko29+/sNPQTkDKYO
github.com/Joel-Haeberli/git-transaction v0.1.2/go.mod h1:cd98lb1P64RZtEpTQXXclpG7+OSp9eDNQjiMFkkxFpA=
github.com/Joel-Haeberli/git-transaction v0.1.3 h1:aXdQkM7WUCBWeAVHhLF4HIWBSrAy28AqKALZswrk9k4=
github.com/Joel-Haeberli/git-transaction v0.1.3/go.mod h1:cd98lb1P64RZtEpTQXXclpG7+OSp9eDNQjiMFkkxFpA=
github.com/Joel-Haeberli/git-transaction v0.1.4 h1:EXi+rf4LZTxseh1cfAgNWK+DDk7/2vcT+vrKiUzZLDc=
github.com/Joel-Haeberli/git-transaction v0.1.4/go.mod h1:cd98lb1P64RZtEpTQXXclpG7+OSp9eDNQjiMFkkxFpA=
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
Expand Down
2 changes: 1 addition & 1 deletion momentum-core/routers/application-router.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (a *ApplicationRouter) addApplication(c *gin.Context) {
return
}

ctx, transaction, err := gittransaction.New(gittransaction.SINGLEBRANCH, repo.Path, a.config.TransactionToken())
ctx, transaction, err := gittransaction.New(TRANSACTION_MODE, repo.Path, a.config.TransactionToken())

application, err := a.applicationService.AddApplication(request, traceId)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion momentum-core/routers/deployment-router.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (d *DeploymentRouter) addDeployment(c *gin.Context) {
return
}

ctx, transaction, err := gittransaction.New(gittransaction.SINGLEBRANCH, repo.Path, d.config.TransactionToken())
ctx, transaction, err := gittransaction.New(TRANSACTION_MODE, repo.Path, d.config.TransactionToken())

deployment, err := d.deploymentService.AddDeployment(request, traceId)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion momentum-core/routers/stage-router.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (sr *StageRouter) addStage(c *gin.Context) {
return
}

ctx, transaction, err := gittransaction.New(gittransaction.SINGLEBRANCH, repo.Path, sr.config.TransactionToken())
ctx, transaction, err := gittransaction.New(TRANSACTION_MODE, repo.Path, sr.config.TransactionToken())

stage, err := sr.stageService.AddStage(request, traceId)
if err != nil {
Expand Down

0 comments on commit 94ba679

Please sign in to comment.