refactor: simplify action function signatures (#1083)

This change reduces the interfaces by removing
obsolete parameters from functions.
Obsolete parameters does not means unused ones, but
parameters which could be retrieved from other parameters
instead.

This should simplify logic and maintainability for these
functions.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Markus Wolfandmergify[bot] authored and GitHub committed 2022-03-29 17:42:11 +00:00
1 parent 31d3603173
commit 5f673cbb6d
7 files changed
+109 -99

No files matched your search

+1 -3
View File
@@ -201,9 +201,7 @@ func TestActionRunner(t *testing.T) {
ee.On("Interpolate", "default value").Return("default value")
tt.step.getRunContext().ExprEval = ee
_, localAction := tt.step.(*stepActionRemote)
err := runActionImpl(tt.step, "dir", "path", "repo", "ref", localAction)(ctx)
err := runActionImpl(tt.step, "dir", newRemoteAction("org/repo/path@ref"))(ctx)
assert.Nil(t, err)
ee.AssertExpectations(t)