Skip to content

Commit 4da4f9d

Browse files
author
Your Name
committed
Fix: skip paths check for tag push in workflows
1 parent 6b9657a commit 4da4f9d

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

modules/actions/workflows_test.go

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,24 +126,23 @@ func TestDetectMatched(t *testing.T) {
126126
expected: true,
127127
},
128128
{
129-
desc: "push to tag matches workflow with paths condition (should skip paths check)",
130-
triggedEvent: webhook_module.HookEventPush,
131-
payload: &api.PushPayload{
129+
desc: "push to tag matches workflow with paths condition (should skip paths check)",
130+
triggedEvent: webhook_module.HookEventPush,
131+
payload: &api.PushPayload{
132132
Ref: "refs/tags/v1.0.0",
133133
Before: "0000000",
134134
Commits: []*api.PayloadCommit{
135135
{
136136
ID: "abcdef123456",
137-
Added: []string{"src/main.go"},
138-
Message: "Release v1.0.0",
139-
},
140-
},
141-
},
142-
commit: nil,
143-
yamlOn: "on:\n push:\n paths:\n - src/**",
144-
expected: true,
145-
},
146-
137+
Added: []string{"src/main.go"},
138+
Message: "Release v1.0.0",
139+
},
140+
},
141+
},
142+
commit: nil,
143+
yamlOn: "on:\n push:\n paths:\n - src/**",
144+
expected: true,
145+
},
147146
}
148147

149148
for _, tc := range testCases {

0 commit comments

Comments
 (0)