Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PipelineListsOptions to woodpecker-go #3652

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Add PipelineListsOptions to woodpecker-go #3652

wants to merge 10 commits into from

Conversation

xoxys
Copy link
Member

@xoxys xoxys commented Apr 26, 2024

I fear that's a breaking change... It's a bit pain IMO that we can not version the go lib independent of the server.

I don't see a (good) way to make it non-breaking. If you have a better idea, please let me know. However, as this will be breaking anyway, we should replace all other raw query parameters used in the lib (e.g. https://github.com/woodpecker-ci/woodpecker/blob/main/woodpecker-go/woodpecker/repo.go#L6) by proper opt structs as well as this makes it easier to extend with future options.

Changes:

  • Add PipelineListOptions and expose them to cli
❯ ./dist/woodpecker-cli pipeline ls --format "#{{ .Number }} {{ .Started }}" --before "2023-08-21T21:11:02+02:00" 2
#1 1692644861
❯ ./dist/woodpecker-cli pipeline ls --format "#{{ .Number }} {{ .Started }}" --after "2023-12-11T15:07:04+01:00" 2
#43 1702762952
  • Add RepoListOptions and expose them to cli
❯ ./dist/woodpecker-cli repo ls --all
testorg/test (id: 2, forgeRemoteID: 3, isActive: true)
testorg2/test2 (id: 4, forgeRemoteID: 4, isActive: true)
woodpecker/woodpecker-test (id: 0, forgeRemoteID: 1, isActive: false)
testorg/woodpecker-test (id: 6, forgeRemoteID: 2, isActive: true)
  • Add DeployOptions
  • Add PipelineStartOptions
  • Add PipelineLastOptions
  • Add RepoPostOptions
  • Add RepoMoveOptions

@xoxys xoxys requested a review from a team April 26, 2024 19:33
@xoxys xoxys added breaking will break existing installations if no manual action happens lib about our woodpecker-go api lib labels Apr 26, 2024
@xoxys
Copy link
Member Author

xoxys commented Apr 26, 2024

How do we handle such PRs in general? Keep it open until we want to do a major version bump?

@qwerty287
Copy link
Contributor

We actually just merged them and ignored that they're breaking...

@xoxys
Copy link
Member Author

xoxys commented Apr 27, 2024

Maybe we should just move the lib to a dedicated repo? But same argumentation might apply to cli, agent etc. which would end in a repo mess instead of the current monorepo approach. So maybe a bad idea 🙃

@woodpecker-bot
Copy link
Collaborator

woodpecker-bot commented Apr 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking will break existing installations if no manual action happens lib about our woodpecker-go api lib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants