#149 Add milestones subcomand

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

close #123

close #123
6543 added this to the v0.4.0 milestone 2 months ago
6543 added the
kind/feature
label 2 months ago
6543 added the
status/wip
label 2 months ago
6543 added 1 commit 2 months ago
6543 added 1 commit 2 months ago
6543 added the
status/needs-reviews
label 2 months ago
6543 removed the
status/wip
label 2 months ago
6543 added 1 commit 2 months ago
6543 added 1 commit 2 months ago
6543 added 1 commit 2 months ago
6543 commented 2 months ago
Poster
Collaborator

I think it is ready now 🚀

I think it is ready now 🚀
6543 added 1 commit 2 months ago
lunny reviewed 2 months ago
cmd/milestones.go
// 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 months ago

Maybe we need a new API PR at first.

Maybe we need a new API PR at first.
6543 commented 2 months ago

@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 months ago

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 months ago

How many milestones on your tested repository?

How many milestones on your tested repository?
6543 commented 2 months ago

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 months ago
  • 6 calls in the worst case ...
* 6 calls in the worst case ...
6543 added 1 commit 2 months ago
6543 added 1 commit 2 months ago
6543 added 1 commit 2 months ago
6543 added 1 commit 2 months ago
6543 added 1 commit 2 months ago
6543 force-pushed feat_milestones from cf3c270871 to a578df3610 2 months ago
6543 commented 2 months 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
label 2 months ago
6543 added the
upstream/sdk
label 2 months ago
6543 added the
status/blocked
label 2 months ago
6543 modified the milestone from v0.4.0 to v0.5.0 2 months ago
6543 removed the
status/needs-reviews
label 2 months ago
6543 added 1 commit 2 months ago
6543 added 1 commit 1 month ago
6543 added a new dependency 1 month ago
6543 commented 1 month ago
Poster
Collaborator
upstream pull: https://github.com/go-gitea/gitea/pull/12336
6543 commented 1 month ago
Poster
Collaborator

@lunny I created a pull to the sdk: https://gitea.com/gitea/go-sdk/pulls/388

@lunny I created a pull to the sdk: https://gitea.com/gitea/go-sdk/pulls/388
6543 removed the
upstream/gitea
label 1 month ago
6543 added 1 commit 1 month ago
6543 removed the
upstream/sdk
label 1 week ago
6543 removed the
status/blocked
label 1 week ago
6543 added 1 commit 1 week ago
6543 added the
status/needs-reviews
label 1 week ago
6543 commented 1 week 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 1 week ago
zeripath reviewed 5 days ago
cmd/milestones.go
Flags: AllDefaultFlags,
}
func getMileIDbyNameOrID(client *gitea.Client, owner, repo, nameOrID string) (int64, error) {
zeripath commented 5 days ago

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 5 days ago

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 5 days ago

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

getMilestoneID is fine, beside MilestoneDetails only ID is needed ...
6543 added 1 commit 5 days ago
zeripath reviewed 5 days ago
cmd/milestones.go
if state == gitea.StateAll {
headers = append(headers, "State")
}
headers = append(headers, []string{
zeripath commented 5 days ago

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 5 days ago
cmd/milestones.go
if state == gitea.StateAll {
item = append(item, string(m.State))
}
item = append(item, []string{
zeripath commented 5 days ago

simy here.

simy here.
6543 added 1 commit 4 days ago
6543 commented 4 days ago
Poster
Collaborator

@zeripath done

@zeripath done
6543 added 1 commit 4 days ago
6543 added a new dependency 4 days ago
6543 added 7 commits 4 days ago
6543 added 2 commits 4 days ago
6543 added 1 commit 4 days ago
6543 added 1 commit 4 days ago
6543 added 1 commit 3 days ago
lunny approved these changes 2 days ago
lunny added 1 commit 2 days ago
6543 added 1 commit 2 days ago
zeripath approved these changes 2 days ago
zeripath approved these changes 2 days ago
6543 merged commit 7c30579900 into master 2 days ago
6543 referenced this issue from a commit 2 days ago
6543 deleted branch feat_milestones 2 days ago
6543 removed the
status/needs-reviews
label 2 days ago

Reviewers

lunny approved these changes 2 days ago
zeripath approved these changes 2 days ago
The pull request has been merged as 7c30579900.
Sign in to join this conversation.
Loading…
There is no content yet.