Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing of drift detection #708

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/digger/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func gitHubCI(lock core_locking.Lock, policyChecker core_policy.Checker, backend
}

// this is used when called from api by the backend and exits in the end of if statement
if wdEvent, ok := ghEvent.(github.WorkflowDispatchEvent); ok && runningMode != "manual" {
if wdEvent, ok := ghEvent.(github.WorkflowDispatchEvent); ok && runningMode != "manual" && runningMode != "drift-detection" {
type Inputs struct {
JobString string `json:"job"`
Id string `json:"id"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/digger/digger.go
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ func runDriftDetection(policyChecker policy.Checker, SCMOrganisation string, SCM
Text string `json:"text"`
}
slackMessage := SlackMessage{
Text: fmt.Sprintf(":bangbang: Drift detected in digger project %v details below: \n```%v```", projectName, plan),
Text: fmt.Sprintf(":bangbang: Drift detected in digger project %v details below: \n\n```\n%v\n```", projectName, plan),
}

jsonData, err := json.Marshal(slackMessage)
Expand Down
Loading