Add milestones subcomands #149

Merged
6543 merged 18 commits from 6543/tea:feat_milestones into master 3 years ago
6543 commented 3 years ago
Owner

close #123

close #123
6543 added this to the v0.4.0 milestone 3 years ago
6543 added the
kind/feature
status/wip
labels 3 years ago
6543 added
status/needs-reviews
and removed
status/wip
labels 3 years ago
6543 commented 3 years ago
Poster
Owner

I think it is ready now ?

I think it is ready now ?
lunny reviewed 3 years ago
Dismissed
@ -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/383
i := 0
for {
lunny commented 3 years ago
Owner

Maybe we need a new API PR at first.

Maybe we need a new API PR at first.
6543 commented 3 years ago
Poster
Owner

@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 3 years ago
Poster
Owner

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 3 years ago
Owner

How many milestones on your tested repository?

How many milestones on your tested repository?
6543 commented 3 years ago
Poster
Owner

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 3 years ago
Poster
Owner
  • 6 calls in the worst case ...
* 6 calls in the worst case ...
6543 commented 3 years ago
Poster
Owner

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 3 years ago
6543 modified the milestone from v0.4.0 to v0.5.0 3 years ago
6543 removed the
status/needs-reviews
label 3 years ago
6543 added a new dependency 3 years ago
6543 commented 3 years ago
Poster
Owner
upstream pull: https://github.com/go-gitea/gitea/pull/12336
6543 commented 3 years ago
Poster
Owner

@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 3 years ago
6543 removed the
upstream/sdk
status/blocked
labels 3 years ago
6543 added the
status/needs-reviews
label 3 years ago
6543 commented 3 years ago
Poster
Owner

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 3 years ago
zeripath reviewed 3 years ago
Dismissed
@ -0,0 +268,4 @@
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 3 years ago
Poster
Owner

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 3 years ago
Poster
Owner

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

getMilestoneID is fine, beside MilestoneDetails only ID is needed ...
zeripath reviewed 3 years ago
Dismissed
@ -0,0 +106,4 @@
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 3 years ago
Dismissed
@ -0,0 +127,4 @@
if state == gitea.StateAll {
item = append(item, string(m.State))
}
item = append(item, []string{
Owner

simy here.

simy here.
6543 commented 3 years ago
Poster
Owner

@zeripath done

@zeripath done
6543 added a new dependency 3 years ago
lunny approved these changes 3 years ago
Dismissed
zeripath approved these changes 3 years ago
Dismissed
zeripath approved these changes 3 years ago
Dismissed
6543 merged commit 7c30579900 into master 3 years ago
6543 referenced this issue from a commit 3 years ago
6543 deleted branch feat_milestones 3 years ago
6543 removed the
status/needs-reviews
label 3 years ago
6543 changed title from Add milestones subcomand to Add milestones subcomands 3 years ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as 7c30579900.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b 6543-feat_milestones master
git pull feat_milestones

Step 2:

Merge the changes and update on Gitea.
git checkout master
git merge --no-ff 6543-feat_milestones
git push origin master
Sign in to join this conversation.
Loading…
There is no content yet.