Bug: tea issue create -L
silently fails to add label if it's not on the first page #464
Labels
No Label
kind/breaking
kind/bug
kind/build
kind/dependency
kind/deployment
kind/docs
kind
enhancement
kind
feature
kind/proposal
kind
question
kind
refactor
kind/security
kind/testing
kind/translation
priority/critical
priority/high
priority/low
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/has-backport
status/has-pull
status/needs-backport
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
upstream/sdk
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/tea#464
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
describe your environment
tea -v
): 0.8.0main
,master
, ortrunk
)Please provide the output of
git remote -v
(if the issue is related to tea not finding resources on Gitea):describe the issue (observed vs expected behaviour)
If I try to create an issue with a label that's alphabetically early, it works. If I specify a label beyond about 50 in the list, the issue is created but it doesn't have the label (and no error is reported). It's as if it only works for labels that would be on the first page of results. As with #463, I tried increasing the default page size, but that didn't seem to help.
The issue here is, that we rely on the property of the API to return all labels when no pagination parameters are given (or are 0) in
task.ResolveLabelNames()
.But a change in the go-sdk (
ListOptions.setDefaults()
) added the default value of&page=1
, adding pagination to the request.Quickfix: pass
.Page: -1
to disable pagination.The proper fix would be to handle pagination in
task.ResolveLabelNames()
, for which it's probably best to wait for gitea/go-sdk#473