woodpecker icon indicating copy to clipboard operation
woodpecker copied to clipboard

CLI: remove step logs

Open zc-devs opened this issue 1 year ago • 2 comments

On top of #3451, addresses PR note

related to #1100

Not tested.

zc-devs avatar Mar 01 '24 18:03 zc-devs

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]
  ...

6543 avatar Mar 01 '24 21:03 6543

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 avatar Mar 01 '24 23:03 zc-devs

@zc-devs I updated the branch and resolved the conflicts. Is it ready for review?

qwerty287 avatar Apr 15 '24 08:04 qwerty287

Let's try. Add build label, please.

zc-devs avatar Apr 15 '24 10:04 zc-devs

Done, triggers on next commit

qwerty287 avatar Apr 15 '24 13:04 qwerty287

Deployment of preview was successful: https://woodpecker-ci-woodpecker-pr-3458.surge.sh

woodpecker-bot avatar Apr 15 '24 16:04 woodpecker-bot

@zc-devs Format check fails, please run make format

qwerty287 avatar Apr 22 '24 15:04 qwerty287