Add milestones subcomands #149

Merged
6543 merged 18 commits from 6543/tea:feat_milestones into master 2 years ago
6543 commented 2 years ago
Collaborator

close #123

close #123
6543 added this to the v0.4.0 milestone 2 years ago
6543 added the
kind/feature
status/wip
labels 2 years ago
6543 added 1 commit 2 years ago
b08054c71e
first draft
6543 added 1 commit 2 years ago
b69fb09a97
first working version
6543 added
status/needs-reviews
and removed
status/wip
labels 2 years ago
6543 added 1 commit 2 years ago
de9e6894f0
be more tollerant with name matching
6543 added 1 commit 2 years ago
ecdeda8a4d
nice Milestone Detail look
6543 added 1 commit 2 years ago
c8658a9e2d
nit
Poster
Collaborator

I think it is ready now ?

I think it is ready now ?
6543 added 1 commit 2 years ago
973721c6bc
fix lint
lunny reviewed 2 years ago
Dismissed
// since there is no API to resolve it we have to iterate all milestones :/
// https://gitea.com/gitea/go-sdk/issues/383
i := 0
for {
lunny commented 2 years ago
Owner

Maybe we need a new API PR at first.

Maybe we need a new API PR at first.
6543 commented 2 years ago
Poster
Collaborator

@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

@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
6543 commented 2 years ago
Poster
Collaborator

this isssue is on track of 0.13.0 so it should make no problem or do I miss something?

this isssue is on track of 0.13.0 so it should make no problem or do I miss something?
lunny commented 2 years ago
Owner

How many milestones on your tested repository?

How many milestones on your tested repository?
6543 commented 2 years ago
Poster
Collaborator

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 instead

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 instead
6543 commented 2 years ago
Poster
Collaborator
  • 6 calls in the worst case ...
* 6 calls in the worst case ...
6543 added 1 commit 2 years ago
872c3d43a1 Merge branch 'master' into feat_milestones
6543 added 1 commit 2 years ago
54a051c477 Merge branch 'master' into feat_milestones
6543 added 1 commit 2 years ago
cf39a6d7c8 Merge branch 'master' into feat_milestones
6543 added 1 commit 2 years ago
15a576c6cd
Merge branch 'master' into feat_milestones
6543 added 1 commit 2 years ago
cf3c270871 Merge branch 'master' into feat_milestones
6543 force-pushed feat_milestones from cf3c270871 to a578df3610 2 years ago
Poster
Collaborator

because of your concerns of the milestone-id lookup function

should we move this feature into the next milestone?
@lunny

because of your concerns of the milestone-id lookup function should we move this feature into the next milestone? @lunny
6543 added the
upstream/gitea
upstream/sdk
status/blocked
labels 2 years ago
6543 modified the milestone from v0.4.0 to v0.5.0 2 years ago
6543 removed the
status/needs-reviews
label 2 years ago
6543 added 1 commit 2 years ago
222eed10a1 Merge branch 'master' into feat_milestones
6543 added 1 commit 2 years ago
36de59d8c2 Merge branch 'master' into feat_milestones
6543 added a new dependency 2 years ago
Poster
Collaborator
upstream pull: https://github.com/go-gitea/gitea/pull/12336
Poster
Collaborator

@lunny I created a pull to the sdk: gitea/go-sdk#388

@lunny I created a pull to the sdk: https://gitea.com/gitea/go-sdk/pulls/388
6543 removed the
upstream/gitea
label 2 years ago
6543 added 1 commit 2 years ago
7444704796 Merge branch 'master' into feat_milestones
6543 removed the
upstream/sdk
status/blocked
labels 2 years ago
6543 added 1 commit 2 years ago
22025990b8 Merge branch 'master' into feat_milestones
6543 added the
status/needs-reviews
label 2 years ago
Poster
Collaborator

the ms-name-resolve will be removed/optimized if sdk v0.13.0 is out ...

the ms-name-resolve will be removed/optimized if sdk v0.13.0 is out ...
6543 removed a dependency 2 years ago
zeripath reviewed 2 years ago
Dismissed
Flags: AllDefaultFlags,
}
func getMileIDbyNameOrID(client *gitea.Client, owner, repo, nameOrID string) (int64, error) {
Owner

I'm really not a fan of this function name. What's wrong with just getMilestoneID?

I'm really not a fan of this function name. What's wrong with just getMilestoneID?
6543 commented 2 years ago
Poster
Collaborator

I'll refactor it to getMilestone because List return a full usable milestone ...

I'll refactor it to **getMilestone** because List return a full usable milestone ...
6543 commented 2 years ago
Poster
Collaborator

getMilestoneID is fine, beside MilestoneDetails only ID is needed ...

getMilestoneID is fine, beside MilestoneDetails only ID is needed ...
6543 added 1 commit 2 years ago
fa1a976e41
rename and add TODO note for sdk release
zeripath reviewed 2 years ago
Dismissed
if state == gitea.StateAll {
headers = append(headers, "State")
}
headers = append(headers, []string{
Owner

Why bother creating the []string{...}... when you can just let the compiler do that for you.

headers = append(header, "Open/Closed Issues", "DueDate")
Why bother creating the []string{...}... when you can just let the compiler do that for you. ```go headers = append(header, "Open/Closed Issues", "DueDate") ```
zeripath reviewed 2 years ago
Dismissed
if state == gitea.StateAll {
item = append(item, string(m.State))
}
item = append(item, []string{
Owner

simy here.

simy here.
6543 added 1 commit 2 years ago
e3b406f949
as per @zeripath
Poster
Collaborator

@zeripath done

@zeripath done
6543 added 1 commit 2 years ago
a2dab3b39c Merge branch 'master' into feat_milestones
6543 added a new dependency 2 years ago
6543 added 7 commits 2 years ago
6543 added 2 commits 2 years ago
6543 added 1 commit 2 years ago
bde7251852
lint
6543 added 1 commit 2 years ago
28a95372a0
Merge branch 'master' into feat_milestones
6543 added 1 commit 2 years ago
fbd2555c2b
pull list show milestone too
lunny approved these changes 2 years ago
Dismissed
lunny added 1 commit 2 years ago
fa7908b7be Merge branch 'master' into feat_milestones
6543 added 1 commit 2 years ago
7e0fbe144f Merge branch 'master' into feat_milestones
zeripath approved these changes 2 years ago
Dismissed
zeripath approved these changes 2 years ago
Dismissed
6543 merged commit 7c30579900 into master 2 years ago
6543 referenced this issue from a commit 2 years ago
6543 deleted branch feat_milestones 2 years ago
6543 removed the
status/needs-reviews
label 2 years ago
6543 changed title from Add milestones subcomand to Add milestones subcomands 2 years ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as 7c30579900.
Sign in to join this conversation.
Loading…
There is no content yet.