From 897d5a026c837ccdae8f3601679e90e559ee5777 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 24 Mar 2018 17:40:49 +0100 Subject: [PATCH 1/2] Add changelog generated by calens Closes #44 --- .travis.yml | 2 ++ changelog/0.9.7_2018-02-18/issue-53 | 3 +++ changelog/CHANGELOG-GitHub.tmpl | 31 ++++++++++++++++++++++++++++ changelog/CHANGELOG.tmpl | 32 +++++++++++++++++++++++++++++ changelog/TEMPLATE | 12 +++++++++++ changelog/unreleased/issue-44 | 3 +++ changelog/unreleased/issue-60 | 8 ++++++++ 7 files changed, 91 insertions(+) create mode 100644 changelog/0.9.7_2018-02-18/issue-53 create mode 100644 changelog/CHANGELOG-GitHub.tmpl create mode 100644 changelog/CHANGELOG.tmpl create mode 100644 changelog/TEMPLATE create mode 100644 changelog/unreleased/issue-44 create mode 100644 changelog/unreleased/issue-60 diff --git a/.travis.yml b/.travis.yml index 0331ee9..069e199 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,12 +26,14 @@ install: - export PATH="$PATH:$GOBIN" - go get -u github.com/golang/lint/golint - go get golang.org/x/tools/cmd/goimports + - go get github.com/restic/calens script: - go install - go test -v . ./cmd/rest-server - go run build.go -v -T - diff <(goimports -d *.go) <(printf "") + - calens after_success: - diff <(golint *.go) <(printf "") diff --git a/changelog/0.9.7_2018-02-18/issue-53 b/changelog/0.9.7_2018-02-18/issue-53 new file mode 100644 index 0000000..95fa5b4 --- /dev/null +++ b/changelog/0.9.7_2018-02-18/issue-53 @@ -0,0 +1,3 @@ +Enhancement: Rename --cpuprofile to --cpu-profile + +https://github.com/restic/rest-server/issues/53 diff --git a/changelog/CHANGELOG-GitHub.tmpl b/changelog/CHANGELOG-GitHub.tmpl new file mode 100644 index 0000000..0ba9fe0 --- /dev/null +++ b/changelog/CHANGELOG-GitHub.tmpl @@ -0,0 +1,31 @@ +{{- range $changes := . }}{{ with $changes -}} +Changelog for rest-server {{ .Version }} ({{ .Date }}) +========================================= + +The following sections list the changes in rest-server {{ .Version }} relevant to users. The changes are ordered by importance. + +Summary +------- +{{ range $entry := .Entries }}{{ with $entry }} + * {{ .TypeShort }} [#{{ .PrimaryID }}]({{ .PrimaryURL }}): {{ .Title }} +{{- end }}{{ end }} + +Details +------- +{{ range $entry := .Entries }}{{ with $entry }} + * {{ .Type }} #{{ .PrimaryID }}: {{ .Title }} +{{ range $par := .Paragraphs }} + {{ $par }} +{{ end }} + {{ range $id := .Issues -}} +{{ ` ` }}[#{{ $id }}](https://github.com/restic/rest-server/issues/{{ $id -}}) +{{- end -}} +{{ range $id := .PRs -}} +{{ ` ` }}[#{{ $id }}](https://github.com/restic/rest-server/pull/{{ $id -}}) +{{- end -}} +{{ ` ` }}{{ range $url := .OtherURLs -}} +{{ $url -}} +{{- end }} +{{ end }}{{ end }} + +{{ end }}{{ end -}} diff --git a/changelog/CHANGELOG.tmpl b/changelog/CHANGELOG.tmpl new file mode 100644 index 0000000..3251123 --- /dev/null +++ b/changelog/CHANGELOG.tmpl @@ -0,0 +1,32 @@ +{{- range $changes := . }}{{ with $changes -}} +Changelog for rest-server {{ .Version }} ({{ .Date }}) +============================================ + +The following sections list the changes in rest-server {{ .Version }} relevant +to users. The changes are ordered by importance. + +Summary +------- +{{ range $entry := .Entries }}{{ with $entry }} + * {{ .TypeShort }} #{{ .PrimaryID }}: {{ .Title }} +{{- end }}{{ end }} + +Details +------- +{{ range $entry := .Entries }}{{ with $entry }} + * {{ .Type }} #{{ .PrimaryID }}: {{ .Title }} +{{ range $par := .Paragraphs }} + {{ wrap $par 80 3 }} +{{ end -}} +{{ range $id := .Issues }} + https://github.com/restic/restic/issues/{{ $id -}} +{{ end -}} +{{ range $id := .PRs }} + https://github.com/restic/restic/pull/{{ $id -}} +{{ end -}} +{{ range $url := .OtherURLs }} + {{ $url -}} +{{ end }} +{{ end }}{{ end }} + +{{ end }}{{ end -}} diff --git a/changelog/TEMPLATE b/changelog/TEMPLATE new file mode 100644 index 0000000..8b3beb0 --- /dev/null +++ b/changelog/TEMPLATE @@ -0,0 +1,12 @@ +Bugfix: Fix behavior for foobar (in present tense) + +We've fixed the behavior for foobar, a long-standing annoyance for rest-server +users. + +The text in the paragraphs is written in past tense. The last section is a list +of issue URLs, PR URLs and other URLs. The first issue ID (or the first PR ID, +in case there aren't any issue links) is used as the primary ID. + +https://github.com/restic/restic/issues/1234 +https://github.com/restic/restic/pull/55555 +https://forum.restic/.net/foo/bar/baz diff --git a/changelog/unreleased/issue-44 b/changelog/unreleased/issue-44 new file mode 100644 index 0000000..cb4074d --- /dev/null +++ b/changelog/unreleased/issue-44 @@ -0,0 +1,3 @@ +Enhancement: Add changelog file + +https://github.com/restic/rest-server/issues/44 diff --git a/changelog/unreleased/issue-60 b/changelog/unreleased/issue-60 new file mode 100644 index 0000000..846db57 --- /dev/null +++ b/changelog/unreleased/issue-60 @@ -0,0 +1,8 @@ +Security: Require auth by default, add --no-auth flag + +In order to prevent users from accidentally exposing rest-server without +authentication, rest-server now defaults to requiring a .htpasswd. If you want +to disable authentication, you need to explicitly pass the new --no-auth flag. + +https://github.com/restic/rest-server/issues/60 +https://github.com/restic/rest-server/pull/61 From 9d6316bd6ec2968e3ec7423f688ec4244f386ece Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 24 Mar 2018 17:41:54 +0100 Subject: [PATCH 2/2] Add pull request URL --- changelog/unreleased/issue-44 | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog/unreleased/issue-44 b/changelog/unreleased/issue-44 index cb4074d..1f50b25 100644 --- a/changelog/unreleased/issue-44 +++ b/changelog/unreleased/issue-44 @@ -1,3 +1,4 @@ Enhancement: Add changelog file https://github.com/restic/rest-server/issues/44 +https://github.com/restic/rest-server/pull/62