Changelog Overhaul 2 #19

Merged
zeripath merged 25 commits from jolheiser/changelog:gitea-sdk into master 2020-01-24 16:30:19 +00:00
Owner

Resolves #4
Continues #6
Resolves #15
Resolves #25

This PR:

  • Branches out services (GitHub and Gitea)
  • Allows users to pass in a token (for private repos/instances)
  • Allows users to generate a details list
  • Allows users to filter out PRs based on minimum index
Resolves #4 Continues #6 Resolves #15 Resolves #25 This PR: * Branches out services (GitHub and Gitea) * Allows users to pass in a token (for private repos/instances) * Allows users to generate a details list * Allows users to filter out PRs based on minimum index
jolheiser added the
enhancement
label 2020-01-13 21:31:16 +00:00
6543 added a new dependency 2020-01-14 16:52:41 +00:00
6543 removed a dependency 2020-01-14 16:52:47 +00:00
6543 added a new dependency 2020-01-14 16:53:04 +00:00
Owner

@jolheiser fix is merged

@jolheiser fix is merged
Author
Owner

This is ready for review, with one more caveat. Currently the SDK doesn't allow us to search milestones by anything other than open state, so this tool can only find open milestones until that is fixed.

This is ready for review, with one more caveat. Currently the SDK doesn't allow us to search milestones by anything other than `open` state, so this tool can only find open milestones until that is fixed.
jolheiser changed title from WIP: Gitea Service to Gitea Service 2020-01-17 18:21:54 +00:00
Owner

what !?! - I'll look at this!

what !?! - I'll look at this!
Owner

@jolheiser for milestones -> gitea/go-sdk#230

@jolheiser for milestones -> https://gitea.com/gitea/go-sdk/issues/230
jolheiser changed title from Gitea Service to Changelog Overhaul 2 2020-01-22 19:54:52 +00:00
6543 reviewed 2020-01-22 23:42:28 +00:00
Dismissed
@ -0,0 +35,4 @@
tagURL := fmt.Sprintf("## [%s](%s/%s/%s/pulls?q=&type=all&state=closed&milestone=%d) - %s", ge.Milestone, ge.BaseURL, ge.Owner, ge.Repo, milestoneID, time.Now().Format("2006-01-02"))
p := 1
// https://github.com/go-gitea/gitea/blob/d92781bf941972761177ac9e07441f8893758fd3/models/repo.go#L63
Owner

can you write the reason instead of linking to source code?

can you write the reason instead of linking to source code?
Author
Owner

Done.

Done.
6543 approved these changes 2020-01-23 02:49:43 +00:00
Dismissed
lunny reviewed 2020-01-23 02:50:23 +00:00
Dismissed
@ -0,0 +1,34 @@
package service
Owner

copyright head

copyright head
lunny reviewed 2020-01-23 02:51:05 +00:00
Dismissed
@ -0,0 +1,10 @@
package service
Owner

copyright head

copyright head
6543 reviewed 2020-01-23 02:53:13 +00:00
Dismissed
@ -4,10 +4,14 @@
Owner

copyright head ...

copyright head ...
Author
Owner

There is already a copyright here.

There is already a copyright here.
6543 reviewed 2020-01-23 02:53:34 +00:00
Dismissed
Owner

copyright head

copyright head
6543 reviewed 2020-01-23 02:54:07 +00:00
Dismissed
@ -1,6 +1,12 @@
# The full repository name
Owner

copyright head ? @lunny

copyright head ? @lunny
6543 reviewed 2020-01-23 02:54:17 +00:00
Dismissed
@ -10,8 +10,8 @@ import (
Owner

copyright head ? @lunny

copyright head ? @lunny
guillep2k reviewed 2020-01-23 02:58:38 +00:00
Dismissed
@ -4,0 +5,4 @@
service: github
# Base URL for Gitea instance if using gitea service type
base-url: https://gitea.com
Member

If the example base-url points to gitea.com, shouldn't the service match it with gitea instead of github?

If the example `base-url` points to gitea.com, shouldn't the service match it with `gitea` instead of `github`?
Author
Owner

Should we really attempt to infer service type based on this URL?

Should we really attempt to infer service type based on this URL?
Member

I didn't mean it like that. I thought this file would make more sense either like:

# Service type (gitea or github)
service: gitea

# Base URL for Gitea instance if using gitea service type
base-url: https://gitea.com

or

# Service type (gitea or github)
service: github

# Base URL for Gitea instance if using GitHub service type
base-url: https://github.com

Currently it looks mixed up: service says github but URL is gitea.com (if it's intentional, I'm missing the point)

I didn't mean it like that. I thought this file would make more sense either like: ``` # Service type (gitea or github) service: gitea # Base URL for Gitea instance if using gitea service type base-url: https://gitea.com ``` or ``` # Service type (gitea or github) service: github # Base URL for Gitea instance if using GitHub service type base-url: https://github.com ``` Currently it looks mixed up: service says `github` but URL is `gitea.com` (if it's intentional, I'm missing the point)
Author
Owner

Ah, no that's okay.
The reason I did it this way is because https://gitea.com is the default gitea instance, yet currently we are still primarily using GitHub, so I left the service set as such.
No need to set a base-url for GitHub because it will never change.

Ah, no that's okay. The reason I did it this way is because `https://gitea.com` is the default gitea instance, yet currently we are still primarily using GitHub, so I left the service set as such. No need to set a base-url for GitHub because it will never change.
Member

It's only a bit confusing, that's all. Being the example file...

It's only a bit confusing, that's all. Being the example file...
Author
Owner

Yeah, fair enough. Do you think it would make more sense to leave base-url blank for the time being?

Yeah, fair enough. Do you think it would make more sense to leave `base-url` blank for the time being?
Member

I'd use Gitea's for both parameters and add a comment about base-url not being required in the case of GitHub. Having said that, I would honor any base-url setting, even in the case of GitHub. We never know, maybe there's another repository hosting service that implements GitHub's API that we never knew about, or maybe GitHub allows private domains for corporate accounts, etc.

Ideally, I'd make base-url optional in both cases (GitHub and Gitea), but always honor its value if present and not empty.

I'd use Gitea's for both parameters and add a comment about `base-url` not being required in the case of GitHub. Having said that, I _would_ honor any `base-url` setting, even in the case of GitHub. We never know, maybe there's another repository hosting service that implements GitHub's API that we never knew about, or maybe GitHub allows private domains for corporate accounts, etc. Ideally, I'd make `base-url` optional in _both cases_ (GitHub and Gitea), but always honor its value if present and not empty.
cmd/generate.go Outdated
@ -0,0 +15,4 @@
var Generate = &cli.Command{
Name: "generate",
Usage: "generate changelog",
Member

If changelog here is a parameter, it's customary to use some indication (e.g. generate {changelog}). In *nix style, curly braces mean required parameters and square brackets mean optional. If you prefer, you could use another style like generate "changelog".

If `changelog` here is a parameter, it's customary to use some indication (e.g. `generate {changelog}`). In *nix style, curly braces mean required parameters and square brackets mean optional. If you prefer, you could use another style like `generate "changelog"`.
Author
Owner

I can change it, this isn't a parameter.

I can change it, this isn't a parameter.
Member

I was wondering about that. No need to change, then. ?

I was wondering about that. No need to change, then. ?
@ -0,0 +8,4 @@
service: github
# Base URL for Gitea instance if using gitea service type
base-url: https://gitea.com
Member

Same concern here

Same concern here
Author
Owner

All copyrights should be updated, except the example config because I don't think there's any reason to?

All copyrights should be updated, except the example config because I don't think there's any reason to?
guillep2k approved these changes 2020-01-23 07:09:13 +00:00
Dismissed
6543 approved these changes 2020-01-23 08:00:53 +00:00
Dismissed
Owner

go test -race go: code.gitea.io/sdk/gitea@v0.0.0-20200116035226-b24cfd841cda: Get https://goproxy.cn/code.gitea.io/sdk/gitea/@v/v0.0.0-20200116035226-b24cfd841cda.mod: No such domain

???

`go test -race go: code.gitea.io/sdk/gitea@v0.0.0-20200116035226-b24cfd841cda: Get https://goproxy.cn/code.gitea.io/sdk/gitea/@v/v0.0.0-20200116035226-b24cfd841cda.mod: No such domain` ???
Owner

@jolheiser tested my fix with your PR: https://drone.gitea.com/gitea/changelog/9/1/2

works :)

fix is here: #26

@jolheiser tested my fix with your PR: https://drone.gitea.com/gitea/changelog/9/1/2 works :) fix is here: #26
Author
Owner

@6543 It worked with my latest push. It's sometimes just a luck thing.

@6543 It worked with my latest push. It's sometimes just a luck thing.
Owner

@jolheiser I thin #26 is still a Improvement

@jolheiser I thin #26 is still a Improvement
guillep2k approved these changes 2020-01-23 18:37:53 +00:00
Dismissed
zeripath closed this pull request 2020-01-24 16:30:18 +00:00
jolheiser deleted branch gitea-sdk 2020-01-24 17:06:08 +00:00
6543 added this to the v0.1.0 milestone 2020-01-26 03:58:45 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Depends on
Reference: gitea/changelog#19
No description provided.