forgejo-sdk/docs/migrate-v0.13-to-v0.14.md
6543 6b6fdd91ce UrlEscape Function Arguments used in UrlPath (#273)
close #271

* [x] add check if user/repo-name is empty
* [x] use net/url for links to encode

Co-authored-by: Andrew Thornton <art27@cantab.net>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/273
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
2021-03-22 04:20:32 +08:00

1.5 KiB

Migration Guide: v0.13 to v0.14

v0.14.0 introduces a number of breaking changes, throu it should not be hard to migrate.
Just follow this guid and if issues still ocure ask for help on discord or
feel free to create an issue.

Removed Functions

  • for GetUserTrackedTimes and GetRepoTrackedTimes use ListRepoTrackedTimes with specific options set

Pulls:

Renamed Functions

  • ListTrackedTimes is now ListIssueTrackedTimes

Pulls:

New Optional Fields

The EditUserOption struct has gained several new Optional fields. For example Email type changed from string to *string.

The easiest migration path is, to wrap your options with: OptionalString(), OptionalBool() and OptionalInt64()

Pulls:

Escape Function Arguments

String arguments like user, repo, tag, ... are now url/path/query escapted as they need. If you had issues and did escape arguments by yourselve you have to remove this now.