Changelog Overhaul 2 #19
No reviewers
Labels
No Label
breaking
bug
build
duplicate
enhancement
feature
help wanted
invalid
lgtm
done
lgtm
need 1
question
skip-changelog
wontfix
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Depends on
#219 Fix ListRepoPullRequests
gitea/go-sdk
Reference: gitea/changelog#19
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "jolheiser/changelog:gitea-sdk"
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?
Resolves #4
Continues #6
Resolves #15
Resolves #25
This PR:
@jolheiser fix is merged
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.WIP: Gitea Serviceto Gitea Servicewhat !?! - I'll look at this!
@jolheiser for milestones -> gitea/go-sdk#230
jolheiser referenced this pull request2020-01-22 18:08:31 +00:00
Gitea Serviceto Changelog Overhaul 2@ -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
can you write the reason instead of linking to source code?
Done.
@ -0,0 +1,34 @@
package service
copyright head
@ -0,0 +1,10 @@
package service
copyright head
@ -4,10 +4,14 @@
copyright head ...
There is already a copyright here.
copyright head
@ -1,6 +1,12 @@
# The full repository name
copyright head ? @lunny
@ -10,8 +10,8 @@ import (
copyright head ? @lunny
@ -4,0 +5,4 @@
service: github
# Base URL for Gitea instance if using gitea service type
base-url: https://gitea.com
If the example
base-url
points to gitea.com, shouldn't the service match it withgitea
instead ofgithub
?Should we really attempt to infer service type based on this URL?
I didn't mean it like that. I thought this file would make more sense either like:
or
Currently it looks mixed up: service says
github
but URL isgitea.com
(if it's intentional, I'm missing the point)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.
It's only a bit confusing, that's all. Being the example file...
Yeah, fair enough. Do you think it would make more sense to leave
base-url
blank for the time being?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 anybase-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.@ -0,0 +15,4 @@
var Generate = &cli.Command{
Name: "generate",
Usage: "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 likegenerate "changelog"
.I can change it, this isn't a parameter.
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
Same concern here
All copyrights should be updated, except the example config because I don't think there's any reason to?
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
???
@jolheiser tested my fix with your PR: https://drone.gitea.com/gitea/changelog/9/1/2
works :)
fix is here: #26
@6543 It worked with my latest push. It's sometimes just a luck thing.
@jolheiser I thin #26 is still a Improvement