Skip to content

Commit

Permalink
Merge pull request #4 from Ecwid/addChange
Browse files Browse the repository at this point in the history
addChange when not approvalEnabled
  • Loading branch information
sapsan73 authored Mar 6, 2024
2 parents a085391 + 17f2484 commit 0c5214d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func getUnixTs() int64 {

type Matcher struct {
runID string
addChange bool
approvalEnabled bool
update bool
forceUpdate bool
Expand All @@ -43,6 +44,7 @@ func NewMatcher(runID string) Matcher {
runID: runID,
approvalKey: "",
approvalEnabled: true,
addChange: true,
update: false,
forceUpdate: false,
normalize: false,
Expand Down Expand Up @@ -102,7 +104,7 @@ func (m Matcher) prependPathString() string {
}

func (m Matcher) addChangeForApproval(compareError error) error {
if err, ok := compareError.(Change); ok {
if err, ok := compareError.(Change); ok && m.addChange {
syncError := m.sync.Sync(func() error {
return addChanges(m.runID, err)
})
Expand Down

0 comments on commit 0c5214d

Please sign in to comment.