Add milestones subcomands #149
3 Participants
Notifications
Due Date
No due date set.
Depends on
#179 Update SDK to v0.13.0
gitea/tea
Reference: gitea/tea#149
Reference in New Issue
Block a user
No description provided.
Delete Branch "6543/tea:feat_milestones"
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?
close #123
I think it is ready now ?
@@ -0,0 +276,4 @@// since there is no API to resolve it we have to iterate all milestones :/// https://gitea.com/gitea/go-sdk/issues/383i := 0for {Maybe we need a new API PR at first.
@lunny I tested it - the speed is totaly ok
And I think we should not block this feature - instead migrate to a better solution with go-sdk v0.13 migration
this isssue is on track of 0.13.0 so it should make no problem or do I miss something?
How many milestones on your tested repository?
not that mouch - but since ListRepoMilestone return up to
>APIMaxItem<say you have 300 MS it would take by default 6 api calls to lookup - and you always have the choice to use the ID insteadcf3c270871toa578df3610because of your concerns of the milestone-id lookup function
should we move this feature into the next milestone?
@lunny
upstream pull: https://github.com/go-gitea/gitea/pull/12336
@lunny I created a pull to the sdk: gitea/go-sdk#388
the ms-name-resolve will be removed/optimized if sdk v0.13.0 is out ...
@@ -0,0 +268,4 @@Flags: AllDefaultFlags,}func getMileIDbyNameOrID(client *gitea.Client, owner, repo, nameOrID string) (int64, error) {I'm really not a fan of this function name. What's wrong with just getMilestoneID?
I'll refactor it to getMilestone because List return a full usable milestone ...
getMilestoneID is fine, beside MilestoneDetails only ID is needed ...
@@ -0,0 +106,4 @@if state == gitea.StateAll {headers = append(headers, "State")}headers = append(headers, []string{Why bother creating the []string{...}... when you can just let the compiler do that for you.
@@ -0,0 +127,4 @@if state == gitea.StateAll {item = append(item, string(m.State))}item = append(item, []string{simy here.
@zeripath done
Add milestones subcomandto Add milestones subcomands