mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
@@ -85,7 +85,7 @@ func gitInfosToChangeLog(infos, docInfos gitInfos) *changeLog {
|
||||
for _, info := range infos {
|
||||
los := strings.ToLower(info.Subject)
|
||||
isFix := strings.Contains(los, "fix")
|
||||
var category = otherChanges
|
||||
category := otherChanges
|
||||
|
||||
// TODO(bep) improve
|
||||
if regexp.MustCompile("(?i)deprecate").MatchString(los) {
|
||||
@@ -176,7 +176,6 @@ func (c countribCount) AuthorLink() string {
|
||||
}
|
||||
|
||||
return c.Author[:strings.Index(c.Author, "@")]
|
||||
|
||||
}
|
||||
|
||||
type contribCounts []countribCount
|
||||
@@ -298,7 +297,6 @@ func gitShort(args ...string) (output string, err error) {
|
||||
|
||||
func tagExists(tag string) (bool, error) {
|
||||
out, err := git("tag", "-l", tag)
|
||||
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
@@ -45,7 +45,6 @@ See #456
|
||||
c.Assert(len(issues), qt.Equals, 4)
|
||||
c.Assert(issues[0], qt.Equals, 123)
|
||||
c.Assert(issues[2], qt.Equals, 543)
|
||||
|
||||
}
|
||||
|
||||
func TestGitVersionTagBefore(t *testing.T) {
|
||||
@@ -66,7 +65,6 @@ func TestTagExists(t *testing.T) {
|
||||
b2, err := tagExists("adfagdsfg")
|
||||
c.Assert(err, qt.IsNil)
|
||||
c.Assert(b2, qt.Equals, false)
|
||||
|
||||
}
|
||||
|
||||
func skipIfCI(t *testing.T) {
|
||||
|
@@ -112,7 +112,6 @@ func (g *gitHubAPI) fetchRepo() (gitHubRepo, error) {
|
||||
repo.Contributors = contributors
|
||||
|
||||
return repo, err
|
||||
|
||||
}
|
||||
|
||||
func doGitHubRequest(req *http.Request, v interface{}) error {
|
||||
|
@@ -175,7 +175,6 @@ func writeReleaseNotes(version string, infosMain, infosDocs gitInfos, to io.Writ
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
func fetchThemeCount() (int, error) {
|
||||
@@ -235,16 +234,12 @@ func (r *ReleaseHandler) releaseNotesState(version string) (releaseNotesState, e
|
||||
}
|
||||
|
||||
return releaseNotesNone, nil
|
||||
|
||||
}
|
||||
|
||||
func (r *ReleaseHandler) writeReleaseNotesToTemp(version string, isPatch bool, infosMain, infosDocs gitInfos) (string, error) {
|
||||
|
||||
docsTempPath, name := getReleaseNotesDocsTempDirAndName(version, isPatch)
|
||||
|
||||
var (
|
||||
w io.WriteCloser
|
||||
)
|
||||
var w io.WriteCloser
|
||||
|
||||
if !r.try {
|
||||
os.Mkdir(docsTempPath, os.ModePerm)
|
||||
@@ -269,7 +264,6 @@ func (r *ReleaseHandler) writeReleaseNotesToTemp(version string, isPatch bool, i
|
||||
}
|
||||
|
||||
return name, nil
|
||||
|
||||
}
|
||||
|
||||
func (r *ReleaseHandler) writeReleaseNotesToDocs(title, description, sourceFilename string) (string, error) {
|
||||
@@ -324,5 +318,4 @@ categories: ["Releases"]%s
|
||||
}
|
||||
|
||||
return targetFullFilename, nil
|
||||
|
||||
}
|
||||
|
@@ -41,5 +41,4 @@ func _TestReleaseNotesWriter(t *testing.T) {
|
||||
c.Assert(writeReleaseNotes("0.21", infos, infos, &b), qt.IsNil)
|
||||
|
||||
fmt.Println(b.String())
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user