mirror of
https://github.com/Threnklyn/jira.git
synced 2026-06-07 13:33:32 +02:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e21f18e987 | |||
| 96bbbd7ce3 | |||
| 3e8b9bd9f5 | |||
| 8fe0d98d54 | |||
| 1a3eaf340c | |||
| 96b4658dcb | |||
| c9d8dfbe55 |
@@ -1,5 +1,10 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 1.0.9 - 2017-09-17
|
||||||
|
|
||||||
|
* need issuetype to use the default list table template now [Cory Bennett] [[3e8b9bd](https://github.com/Netflix-Skunkworks/go-jira/commit/3e8b9bd)]
|
||||||
|
* [[#102](https://github.com/Netflix-Skunkworks/go-jira/issues/102)] add issuetype into the default queryfields and add it to the default `table` list template [Cory Bennett] [[c9d8dfb](https://github.com/Netflix-Skunkworks/go-jira/commit/c9d8dfb)]
|
||||||
|
|
||||||
## 1.0.8 - 2017-09-17
|
## 1.0.8 - 2017-09-17
|
||||||
|
|
||||||
* [[#100](https://github.com/Netflix-Skunkworks/go-jira/issues/100)] add support for posting, fetching, listing and removing attachments [Cory Bennett] [[66eb7bf](https://github.com/Netflix-Skunkworks/go-jira/commit/66eb7bf)]
|
* [[#100](https://github.com/Netflix-Skunkworks/go-jira/issues/100)] add support for posting, fetching, listing and removing attachments [Cory Bennett] [[66eb7bf](https://github.com/Netflix-Skunkworks/go-jira/commit/66eb7bf)]
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ release:
|
|||||||
echo '```' >> README.md
|
echo '```' >> README.md
|
||||||
./jira --help-long >> README.md || true
|
./jira --help-long >> README.md || true
|
||||||
echo '```' >> README.md
|
echo '```' >> README.md
|
||||||
git diff --shortstat README.md | grep -v . || git commit -m "Updated Usage" README.md
|
git diff --exit-code --quiet README.md || git commit -m "Updated Usage" README.md
|
||||||
git commit -m "Updated Changelog" CHANGELOG.md
|
git commit -m "Updated Changelog" CHANGELOG.md
|
||||||
git commit -m "version bump" jira.go
|
git commit -m "version bump" jira.go
|
||||||
git tag v$(NEWVER)
|
git tag v$(NEWVER)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
var log = logging.MustGetLogger("jira")
|
var log = logging.MustGetLogger("jira")
|
||||||
|
|
||||||
const VERSION = "1.0.8"
|
const VERSION = "1.0.9"
|
||||||
|
|
||||||
type Jira struct {
|
type Jira struct {
|
||||||
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
|
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
|
||||||
|
|||||||
@@ -261,14 +261,14 @@ const defaultDebugTemplate = "{{ . | toJson}}\n"
|
|||||||
const defaultListTemplate = "{{ range .issues }}{{ .key | append \":\" | printf \"%-12s\"}} {{ .fields.summary }}\n{{ end }}"
|
const defaultListTemplate = "{{ range .issues }}{{ .key | append \":\" | printf \"%-12s\"}} {{ .fields.summary }}\n{{ end }}"
|
||||||
|
|
||||||
const defaultTableTemplate = `{{/* table template */ -}}
|
const defaultTableTemplate = `{{/* table template */ -}}
|
||||||
{{$w := sub termWidth 92 -}}
|
{{$w := sub termWidth 107 -}}
|
||||||
+{{ "-" | rep 16 }}+{{ "-" | rep $w }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+{{ "-" | rep 12 }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+
|
+{{ "-" | rep 16 }}+{{ "-" | rep $w }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+{{ "-" | rep 12 }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+
|
||||||
| {{ "Issue" | printf "%-14s" }} | {{ "Summary" | printf (printf "%%-%ds" (sub $w 2)) }} | {{ "Priority" | printf "%-12s" }} | {{ "Status" | printf "%-12s" }} | {{ "Age" | printf "%-10s" }} | {{ "Reporter" | printf "%-12s" }} | {{ "Assignee" | printf "%-12s" }} |
|
| {{ "Issue" | printf "%-14s" }} | {{ "Summary" | printf (printf "%%-%ds" (sub $w 2)) }} | {{ "Type" | printf "%-12s"}} | {{ "Priority" | printf "%-12s" }} | {{ "Status" | printf "%-12s" }} | {{ "Age" | printf "%-10s" }} | {{ "Reporter" | printf "%-12s" }} | {{ "Assignee" | printf "%-12s" }} |
|
||||||
+{{ "-" | rep 16 }}+{{ "-" | rep $w }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+{{ "-" | rep 12 }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+
|
+{{ "-" | rep 16 }}+{{ "-" | rep $w }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+{{ "-" | rep 12 }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+
|
||||||
{{ range .issues -}}
|
{{ range .issues -}}
|
||||||
| {{ .key | printf "%-14s"}} | {{ .fields.summary | abbrev (sub $w 2) | printf (printf "%%-%ds" (sub $w 2)) }} | {{.fields.priority.name | printf "%-12s" }} | {{.fields.status.name | printf "%-12s" }} | {{.fields.created | age | printf "%-10s" }} | {{if .fields.reporter}}{{ .fields.reporter.name | printf "%-12s"}}{{else}}<unassigned>{{end}} | {{if .fields.assignee }}{{.fields.assignee.name | printf "%-12s" }}{{else}}<unassigned>{{end}} |
|
| {{ .key | printf "%-14s"}} | {{ .fields.summary | abbrev (sub $w 2) | printf (printf "%%-%ds" (sub $w 2)) }} | {{.fields.issuetype.name | printf "%-12s" }} | {{.fields.priority.name | printf "%-12s" }} | {{.fields.status.name | printf "%-12s" }} | {{.fields.created | age | printf "%-10s" }} | {{if .fields.reporter}}{{ .fields.reporter.name | printf "%-12s"}}{{else}}<unassigned>{{end}} | {{if .fields.assignee }}{{.fields.assignee.name | printf "%-12s" }}{{else}}<unassigned>{{end}} |
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
+{{ "-" | rep 16 }}+{{ "-" | rep $w }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+{{ "-" | rep 12 }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+
|
+{{ "-" | rep 16 }}+{{ "-" | rep $w }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+{{ "-" | rep 12 }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+
|
||||||
`
|
`
|
||||||
const defaultAttachListTemplate = `{{/* table template */ -}}
|
const defaultAttachListTemplate = `{{/* table template */ -}}
|
||||||
+{{ "-" | rep 12 }}+{{ "-" | rep 30 }}+{{ "-" | rep 12 }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+
|
+{{ "-" | rep 12 }}+{{ "-" | rep 30 }}+{{ "-" | rep 12 }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@ func CmdEpicListRegistry() *jiracli.CommandRegistryEntry {
|
|||||||
opts.MaxResults = 500
|
opts.MaxResults = 500
|
||||||
}
|
}
|
||||||
if opts.QueryFields == "" {
|
if opts.QueryFields == "" {
|
||||||
opts.QueryFields = "assignee,created,priority,reporter,status,summary,updated"
|
opts.QueryFields = "assignee,created,priority,reporter,status,summary,updated,issuetype"
|
||||||
}
|
}
|
||||||
if opts.Sort == "" {
|
if opts.Sort == "" {
|
||||||
opts.Sort = "priority asc, key"
|
opts.Sort = "priority asc, key"
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ func CmdListRegistry() *jiracli.CommandRegistryEntry {
|
|||||||
opts.MaxResults = 500
|
opts.MaxResults = 500
|
||||||
}
|
}
|
||||||
if opts.QueryFields == "" {
|
if opts.QueryFields == "" {
|
||||||
opts.QueryFields = "assignee,created,priority,reporter,status,summary,updated"
|
opts.QueryFields = "assignee,created,priority,reporter,status,summary,updated,issuetype"
|
||||||
}
|
}
|
||||||
if opts.Sort == "" {
|
if opts.Sort == "" {
|
||||||
opts.Sort = "priority asc, key"
|
opts.Sort = "priority asc, key"
|
||||||
|
|||||||
+5
-5
@@ -58,11 +58,11 @@ EOF
|
|||||||
|
|
||||||
RUNS $jira ls --project BASIC --template table
|
RUNS $jira ls --project BASIC --template table
|
||||||
DIFF <<EOF
|
DIFF <<EOF
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
| Issue | Summary | Priority | Status | Age | Reporter | Assignee |
|
| Issue | Summary | Type | Priority | Status | Age | Reporter | Assignee |
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
| $(printf %-14s $issue) | summary | Medium | To Do | a minute | gojira | gojira |
|
| $(printf %-14s $issue) | summary | Bug | Medium | To Do | a minute | gojira | gojira |
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|||||||
@@ -72,9 +72,9 @@ EOF
|
|||||||
|
|
||||||
RUNS $jira mine
|
RUNS $jira mine
|
||||||
DIFF <<EOF
|
DIFF <<EOF
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
| Issue | Summary | Priority | Status | Age | Reporter | Assignee |
|
| Issue | Summary | Type | Priority | Status | Age | Reporter | Assignee |
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
| $(printf %-14s $issue) | summary | Medium | To Do | a minute | gojira | gojira |
|
| $(printf %-14s $issue) | summary | Bug | Medium | To Do | a minute | gojira | gojira |
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
+19
-19
@@ -46,10 +46,10 @@ EOF
|
|||||||
RUNS $jira epic list $epic
|
RUNS $jira epic list $epic
|
||||||
|
|
||||||
DIFF<<EOF
|
DIFF<<EOF
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
| Issue | Summary | Priority | Status | Age | Reporter | Assignee |
|
| Issue | Summary | Type | Priority | Status | Age | Reporter | Assignee |
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -69,12 +69,12 @@ EOF
|
|||||||
RUNS $jira epic list $epic
|
RUNS $jira epic list $epic
|
||||||
|
|
||||||
DIFF<<EOF
|
DIFF<<EOF
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
| Issue | Summary | Priority | Status | Age | Reporter | Assignee |
|
| Issue | Summary | Type | Priority | Status | Age | Reporter | Assignee |
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
| $(printf %-14s $issue1) | summary | Medium | To Do | a minute | gojira | gojira |
|
| $(printf %-14s $issue1) | summary | Bug | Medium | To Do | a minute | gojira | gojira |
|
||||||
| $(printf %-14s $issue2) | summary | Medium | To Do | a minute | gojira | gojira |
|
| $(printf %-14s $issue2) | summary | Bug | Medium | To Do | a minute | gojira | gojira |
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -92,11 +92,11 @@ EOF
|
|||||||
RUNS $jira epic list $epic
|
RUNS $jira epic list $epic
|
||||||
|
|
||||||
DIFF<<EOF
|
DIFF<<EOF
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
| Issue | Summary | Priority | Status | Age | Reporter | Assignee |
|
| Issue | Summary | Type | Priority | Status | Age | Reporter | Assignee |
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
| $(printf %-14s $issue2) | summary | Medium | To Do | a minute | gojira | gojira |
|
| $(printf %-14s $issue2) | summary | Bug | Medium | To Do | a minute | gojira | gojira |
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -114,8 +114,8 @@ EOF
|
|||||||
RUNS $jira epic list $epic
|
RUNS $jira epic list $epic
|
||||||
|
|
||||||
DIFF<<EOF
|
DIFF<<EOF
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
| Issue | Summary | Priority | Status | Age | Reporter | Assignee |
|
| Issue | Summary | Type | Priority | Status | Age | Reporter | Assignee |
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user