This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 86edb45cd feat: allow setting originalEnvironment in webhook
deployments (#8600)
86edb45cd is described below
commit 86edb45cd0372b40d0fe3a2bc2c6480da8d23ae2
Author: Adam Furbee <[email protected]>
AuthorDate: Wed Oct 8 22:50:43 2025 -0500
feat: allow setting originalEnvironment in webhook deployments (#8600)
Makes sense to me. Thanks for your contribution.
---
backend/plugins/webhook/api/deployments.go | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/backend/plugins/webhook/api/deployments.go
b/backend/plugins/webhook/api/deployments.go
index 8df9d5003..bbfb2bb83 100644
--- a/backend/plugins/webhook/api/deployments.go
+++ b/backend/plugins/webhook/api/deployments.go
@@ -39,11 +39,12 @@ import (
)
type WebhookDeploymentReq struct {
- Id string `mapstructure:"id" validate:"required"`
- DisplayTitle string `mapstructure:"displayTitle"`
- Result string `mapstructure:"result"`
- Environment string `validate:"omitempty,oneof=PRODUCTION STAGING
TESTING DEVELOPMENT"`
- Name string `mapstructure:"name"`
+ Id string `mapstructure:"id" validate:"required"`
+ DisplayTitle string `mapstructure:"displayTitle"`
+ Result string `mapstructure:"result"`
+ Environment string `validate:"omitempty,oneof=PRODUCTION
STAGING TESTING DEVELOPMENT"`
+ OriginalEnvironment string `mapstructure:"originalEnvironment"`
+ Name string `mapstructure:"name"`
// DeploymentCommits is used for multiple commits in one deployment
DeploymentCommits []WebhookDeploymentCommitReq
`mapstructure:"deploymentCommits" validate:"omitempty,dive"`
CreatedDate *time.Time
`mapstructure:"createdDate"`
@@ -219,7 +220,7 @@ func CreateDeploymentAndDeploymentCommits(connection
*models.WebhookConnection,
DisplayTitle: commit.DisplayTitle,
RepoUrl: commit.RepoUrl,
Environment: request.Environment,
- OriginalEnvironment: request.Environment,
+ OriginalEnvironment: request.OriginalEnvironment,
RefName: commit.RefName,
CommitSha: commit.CommitSha,
CommitMsg: commit.CommitMsg,