Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkg/cmd/release/shared/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var ReleaseFields = []string{
"id",
"isDraft",
"isPrerelease",
"isImmutable",
"name",
"publishedAt",
"tagName",
Expand All @@ -48,6 +49,7 @@ type Release struct {
Body string `json:"body"`
IsDraft bool `json:"draft"`
IsPrerelease bool `json:"prerelease"`
IsImmutable bool `json:"immutable"`
CreatedAt time.Time `json:"created_at"`
PublishedAt *time.Time `json:"published_at"`

Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/release/view/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ func renderReleasePlain(w io.Writer, release *shared.Release) error {
fmt.Fprintf(w, "tag:\t%s\n", release.TagName)
fmt.Fprintf(w, "draft:\t%v\n", release.IsDraft)
fmt.Fprintf(w, "prerelease:\t%v\n", release.IsPrerelease)
fmt.Fprintf(w, "immutable:\t%v\n", release.IsImmutable)
Comment thread
andyfeller marked this conversation as resolved.
fmt.Fprintf(w, "author:\t%s\n", release.Author.Login)
fmt.Fprintf(w, "created:\t%s\n", release.CreatedAt.Format(time.RFC3339))
if !release.IsDraft {
Expand Down
4 changes: 4 additions & 0 deletions pkg/cmd/release/view/view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func TestJSONFields(t *testing.T) {
"id",
"isDraft",
"isPrerelease",
"isImmutable",
"name",
"publishedAt",
"tagName",
Expand Down Expand Up @@ -196,6 +197,7 @@ func Test_viewRun(t *testing.T) {
tag: v1.2.3
draft: false
prerelease: false
immutable: true
author: MonaLisa
created: 2020-08-31T15:44:24+02:00
published: 2020-08-31T15:44:24+02:00
Expand All @@ -220,6 +222,7 @@ func Test_viewRun(t *testing.T) {
tag: v1.2.3
draft: false
prerelease: false
immutable: true
author: MonaLisa
created: 2020-08-31T15:44:24+02:00
published: 2020-08-31T15:44:24+02:00
Expand All @@ -244,6 +247,7 @@ func Test_viewRun(t *testing.T) {
shared.StubFetchRelease(t, fakeHTTP, "OWNER", "REPO", tt.opts.TagName, fmt.Sprintf(`{
Comment thread
andyfeller marked this conversation as resolved.
"tag_name": "v1.2.3",
"draft": false,
"immutable": true,
"author": { "login": "MonaLisa" },
"body": "%[2]s",
"created_at": "%[1]s",
Expand Down
Loading