mirror of
https://github.com/Threnklyn/jira.git
synced 2026-05-19 20:53:27 +02:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e21f18e987 | |||
| 96bbbd7ce3 | |||
| 3e8b9bd9f5 | |||
| 8fe0d98d54 | |||
| 1a3eaf340c | |||
| 96b4658dcb | |||
| c9d8dfbe55 |
@@ -1,5 +1,10 @@
|
||||
# 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
|
||||
|
||||
* [[#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
|
||||
./jira --help-long >> README.md || true
|
||||
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 "version bump" jira.go
|
||||
git tag v$(NEWVER)
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var log = logging.MustGetLogger("jira")
|
||||
|
||||
const VERSION = "1.0.8"
|
||||
const VERSION = "1.0.9"
|
||||
|
||||
type Jira struct {
|
||||
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 defaultTableTemplate = `{{/* table template */ -}}
|
||||
{{$w := sub termWidth 92 -}}
|
||||
+{{ "-" | rep 16 }}+{{ "-" | rep $w }}+{{ "-" | 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" }} |
|
||||
+{{ "-" | rep 16 }}+{{ "-" | rep $w }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+{{ "-" | rep 12 }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+
|
||||
{{$w := sub termWidth 107 -}}
|
||||
+{{ "-" | 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)) }} | {{ "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 14 }}+{{ "-" | rep 12 }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+
|
||||
{{ 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 -}}
|
||||
+{{ "-" | 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 */ -}}
|
||||
+{{ "-" | rep 12 }}+{{ "-" | rep 30 }}+{{ "-" | rep 12 }}+{{ "-" | rep 14 }}+{{ "-" | rep 14 }}+
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ func CmdEpicListRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts.MaxResults = 500
|
||||
}
|
||||
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 == "" {
|
||||
opts.Sort = "priority asc, key"
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ func CmdListRegistry() *jiracli.CommandRegistryEntry {
|
||||
opts.MaxResults = 500
|
||||
}
|
||||
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 == "" {
|
||||
opts.Sort = "priority asc, key"
|
||||
|
||||
+5
-5
@@ -58,11 +58,11 @@ EOF
|
||||
|
||||
RUNS $jira ls --project BASIC --template table
|
||||
DIFF <<EOF
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
| Issue | Summary | Priority | Status | Age | Reporter | Assignee |
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
| $(printf %-14s $issue) | summary | Medium | To Do | a minute | gojira | gojira |
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
| Issue | Summary | Type | Priority | Status | Age | Reporter | Assignee |
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
| $(printf %-14s $issue) | summary | Bug | Medium | To Do | a minute | gojira | gojira |
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
EOF
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -72,9 +72,9 @@ EOF
|
||||
|
||||
RUNS $jira mine
|
||||
DIFF <<EOF
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
| Issue | Summary | Priority | Status | Age | Reporter | Assignee |
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
| $(printf %-14s $issue) | summary | Medium | To Do | a minute | gojira | gojira |
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
| Issue | Summary | Type | Priority | Status | Age | Reporter | Assignee |
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
| $(printf %-14s $issue) | summary | Bug | Medium | To Do | a minute | gojira | gojira |
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
EOF
|
||||
|
||||
+19
-19
@@ -46,10 +46,10 @@ EOF
|
||||
RUNS $jira epic list $epic
|
||||
|
||||
DIFF<<EOF
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
| Issue | Summary | Priority | Status | Age | Reporter | Assignee |
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
| Issue | Summary | Type | Priority | Status | Age | Reporter | Assignee |
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
EOF
|
||||
|
||||
###############################################################################
|
||||
@@ -69,12 +69,12 @@ EOF
|
||||
RUNS $jira epic list $epic
|
||||
|
||||
DIFF<<EOF
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
| Issue | Summary | Priority | Status | Age | Reporter | Assignee |
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
| $(printf %-14s $issue1) | summary | Medium | To Do | a minute | gojira | gojira |
|
||||
| $(printf %-14s $issue2) | summary | Medium | To Do | a minute | gojira | gojira |
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
| Issue | Summary | Type | Priority | Status | Age | Reporter | Assignee |
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
| $(printf %-14s $issue1) | summary | Bug | Medium | To Do | a minute | gojira | gojira |
|
||||
| $(printf %-14s $issue2) | summary | Bug | Medium | To Do | a minute | gojira | gojira |
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
EOF
|
||||
|
||||
###############################################################################
|
||||
@@ -92,11 +92,11 @@ EOF
|
||||
RUNS $jira epic list $epic
|
||||
|
||||
DIFF<<EOF
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
| Issue | Summary | Priority | Status | Age | Reporter | Assignee |
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
| $(printf %-14s $issue2) | summary | Medium | To Do | a minute | gojira | gojira |
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
| Issue | Summary | Type | Priority | Status | Age | Reporter | Assignee |
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
| $(printf %-14s $issue2) | summary | Bug | Medium | To Do | a minute | gojira | gojira |
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
EOF
|
||||
|
||||
###############################################################################
|
||||
@@ -114,8 +114,8 @@ EOF
|
||||
RUNS $jira epic list $epic
|
||||
|
||||
DIFF<<EOF
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
| Issue | Summary | Priority | Status | Age | Reporter | Assignee |
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
+----------------+---------------------------------------------------------+--------------+--------------+------------+--------------+--------------+
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
| Issue | Summary | Type | Priority | Status | Age | Reporter | Assignee |
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
+----------------+------------------------------------------+--------------+--------------+--------------+------------+--------------+--------------+
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user