Commit Graph

163 Commits

Author SHA1 Message Date
Mike Pountney 40a7c65366 Tweak CmdLabels args so that magic happens with CLI
The CLI looks for commands (like 'labels') in the first two positional args. This
is how commands like 'BLOCKER blocks ISSUE' work.

As per @coryb's comments in #21 - this allows us to support set/add/remove in a
consistent way for other types: components for example.

This commit rearranges the command to be as follows:

    jira (set/add/remove) labels ISSUE LABELS...

The options to CmdLabels have been reordered accordingly.
2016-01-03 20:10:49 -08:00
Mike Pountney 4f988b42f8 Merge branch 'master' into label_command 2016-01-03 19:50:47 -08:00
coryb 8712b4af6b Merge pull request #22 from mikepea/library_break_out
Expose key functionality for library consumption
2015-12-31 12:22:09 -08:00
Mike Pountney 8977f3dd9b Expose ViewTicket as per FindIssues
This allows external users of the API to retreive issue details, in the same
manner that FindIssues provides for lists of issues.
2015-12-31 12:06:04 -08:00
Mike Pountney da6cbd5021 Add exposed versions of getTemplate and runTemplate
GetTemplate and RunTemplate allow external users to access the template system,
and in particular allow them to provide their own Buffer to write the output to.

I've implemented exposed versions calling the private functions, rather than breaking
the internal API. If this isn't a concern, we should remove getTemplate and runTemplate
in a future commit.
2015-12-31 12:03:22 -08:00
Mike Pountney 408743b3df go fmt 2015-12-31 11:52:55 -08:00
Mike Pountney 230b52d528 Add 'labels' command to set/add/remove labels
This adds 'labels' command, which allows for the setting, addition and removal
of labels on an issue.

'set' action resets the issue labels to the list provided.
'add' action adds the supplied labels to the issue
'remove' action removes the supplied labels from the issue

The API already gracefully handles duplication, removal of non-existant labels, and the
supplying of an empty list of labels (which is useful in the case of 'set')

Eg

jira labels TEST-123 add label1 label2 label3
jira labels TEST-123 remove label1 label2
jira labels TEST-123 set label1 label2 label3
jira labels TEST-123 set # clears any labels on the issue
jira labels TEST-123 add # no-op
jira labels TEST-123 remove # no-op

This mirrors the functionality of the API.
2015-12-24 11:30:52 -08:00
coryb 425b571212 Merge pull request #20 from mikepea/add_join_template_func
Add a 'join' func to the template engine
2015-12-23 12:05:34 -08:00
Mike Pountney a7820fe7d5 Add a 'join' func to the template engine
I needed this so that I can display JIRA labels in my 'list' template.
2015-12-23 06:15:31 -08:00
Cory Bennett 7268b9e346 make "jira" golang package, move code from jira/cli to root, move jira/main.go to main/main.go 2015-12-22 17:56:53 -08:00
Cory Bennett 2df21d3023 Updated Changelog 2015-12-09 20:58:11 -08:00
Cory Bennett 3c30f3b039 fix jira trans TRANS ISSUE (case sensitivity issue), also go fmt 2015-12-09 20:57:10 -08:00
Cory Bennett dd419b161c Updated Changelog 2015-12-03 14:47:55 -08:00
Cory Bennett 4f4a89b972 need to default "quiet" to false 2015-12-03 14:47:31 -08:00
Cory Bennett d8d574a84a Updated Changelog 2015-12-03 12:56:18 -08:00
Cory Bennett c9ac162990 add --quiet command to not print the OK ..
add --saveFile option to print the issue/link to a file on create command
2015-12-03 12:55:14 -08:00
Cory Bennett eaddfe6788 fix overrides 2015-12-03 12:21:55 -08:00
Cory Bennett 90ef56accd add abstract request wrapper to allow you to access/process random apis
supported by Jira but not yet supported by go-jira
2015-12-03 11:35:51 -08:00
Cory Bennett 228d7d0803 Updated Changelog 2015-11-23 17:09:17 -08:00
Cory Bennett a1eb4a1e90 jira edit should not require one arguemnt (allow for --query) 2015-11-23 17:08:40 -08:00
Cory Bennett e67ffb632f fix CURVER in case of building from src tar.gz 2015-11-23 14:35:41 -08:00
Cory Bennett 4c8bf5ddff tweak build 2015-11-23 14:23:29 -08:00
Cory Bennett b9c5dad3a1 Updated Changelog 2015-11-23 14:17:41 -08:00
Cory Bennett fd2a2fe65f [#17] print usage on missing arguments 2015-11-23 14:17:09 -08:00
Cory Bennett 7662885d0d bump version 2015-11-17 12:30:11 -08:00
Cory Bennett 8a7cd2275f Updated Changelog 2015-11-17 12:30:11 -08:00
coryb 1133dae127 Merge pull request #16 from oschrenk/fix-typo
s/enpoint/endpoint/g
2015-10-16 08:50:52 -07:00
Oliver Schrenk c5d251dec8 s/enpoint/endpoint/g 2015-10-16 11:12:25 +02:00
coryb 83da78dfdc Merge pull request #14 from mikepea/ls_with_updated
Add 'updated' to queryfields; dateFormat template command; bug fix.
2015-10-15 08:37:47 -07:00
Mike Pountney 68d3baeac6 Implement dateFormat template command
Wrapper around time.Format, so that we can make concise lists without
the whole JIRA ISO timestamp, eg:

{{ dateFormat "2006-01-02T15:04" .fields.updated }}
2015-10-15 12:43:03 +01:00
Mike Pountney 91e24759e0 Add 'updated' field to default queryfields.
This is pretty essential if you want to get an idea of how stale a ticket is.
2015-10-15 12:35:07 +01:00
Mike Pountney 4d7fdb87a9 Fix export-templates option (typo) 2015-10-15 12:05:33 +01:00
Cory Bennett 47ced2fa24 when yaml element resolves to "\n" strip it out so we dont post it to jira 2015-10-06 11:54:05 -07:00
Cory Bennett 618f245c35 print PUT/POST data when using --dryrun to help debug 2015-10-06 11:50:47 -07:00
Cory Bennett 9d48ca222a bump version 2015-09-19 00:17:32 -07:00
Cory Bennett 6f3dba4e43 Updated Changelog 2015-09-19 00:17:32 -07:00
Cory Bennett 909eb06364 replace dead/deprecated code.google.com/p/gopass with golang.org/x/crypto/ssh/terminal for reading password from stdin 2015-09-19 00:17:08 -07:00
Cory Bennett 3977e530f7 bump version 2015-09-18 23:26:16 -07:00
Cory Bennett 52b1126b28 Updated Changelog 2015-09-18 23:26:16 -07:00
Cory Bennett 9348a4b4c0 fix exception from "jira create" 2015-09-18 23:24:50 -07:00
Cory Bennett 1c08a7d609 add some debug messages to help diagnose login failures 2015-09-18 23:18:38 -07:00
Cory Bennett bb9097b3ec bump version 2015-09-16 23:22:06 -07:00
Cory Bennett 355d35ff58 Updated Changelog 2015-09-16 23:22:06 -07:00
Cory Bennett 0ae6a0790a update version when we create changelog entries 2015-09-16 23:21:36 -07:00
Cory Bennett 8385ee2afb add --version 2015-09-16 23:16:51 -07:00
Cory Bennett 23347ddcad Updated Changelog 2015-09-16 23:05:02 -07:00
Cory Bennett 15ae929703 fix command line parser broken in 0.0.10 2015-09-16 23:04:36 -07:00
Cory Bennett e2c27f18d2 update changelog 2015-09-15 23:43:57 -07:00
Cory Bennett 2ee842270a Updated Changelog 2015-09-15 23:41:20 -07:00
Cory Bennett 07e3f7bea6 gofmt 2015-09-15 23:40:41 -07:00