mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-08 16:20:29 +00:00
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:
1 parent
31d3603173
commit
5f673cbb6d
7 files changed
+109
-99
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user