woodpecker
woodpecker copied to clipboard
CLI: remove step logs
Well you still have to adjust the code as step
is now not int64 but of type []int64 ...
So instead of:
if step != 0 {
...
use
if len(step) != 0 {
stepID := step[0]
...
TLDR: Made separate library call. Should not be a breaking too.
LogsPurge(repoID, pipeline int64, step ...int64) error
Looks like it is not many step IDs, but any optional argument. So, I could make it
LogsPurge(repoID, pipeline int64, optArg ...int64) error
Next question is why are optional args integers only? Then it should be
LogsPurge(repoID, pipeline int64, optArg ...Interface{}) error
Then we should distinct that arguments somehow. So, it probably would be a map (argName:argValue). Looks over complicated to me.
@zc-devs I updated the branch and resolved the conflicts. Is it ready for review?
Let's try. Add build
label, please.
Done, triggers on next commit
Deployment of preview was successful: https://woodpecker-ci-woodpecker-pr-3458.surge.sh
@zc-devs Format check fails, please run make format