Commit Graph

211 Commits

Author SHA1 Message Date
Cory Bennett dd7d1ccd3a [#43] add support for jira done|todo|prog commands 2016-07-30 20:05:13 -07:00
Cory Bennett fdce34dfc0 [issue #46] add documentation for how to create/edit templates 2016-07-08 12:12:02 -07:00
coryb e7a78a1cc1 Merge pull request #24 from mikepea/edit_template_common
Reporter is not generally editable.
2016-06-30 08:53:34 -07:00
Cory Bennett 055b61d400 Updated Changelog 2016-06-29 23:11:04 -07:00
Cory Bennett 0980f8e197 [#44] Close tmpfile before rename to work around "The process cannot access the file because it is being used by another process" error on windows. 2016-06-29 23:09:27 -07:00
Cory Bennett 4f0dbf5c7b trim out unused platforms, we can add then back in on request
publish windows binaries as .exe
2016-06-29 23:08:54 -07:00
Cory Bennett 0e4e85aafd fix for versions with 'v' prefix 2016-06-28 23:07:06 -07:00
Cory Bennett fa4ac4b7ec fix v in version prefix 2016-06-28 23:02:03 -07:00
Cory Bennett a86642f2f4 Updated Changelog 2016-06-28 23:00:49 -07:00
Cory Bennett adcedc4855 use USERPROFILE instead of HOME for windows, rework paths to use
filepath.Join for better cross platform support
2016-06-29 06:57:59 +01:00
Cory Bennett d5156d54fe Merge branch 'master' of github.com:Netflix-Skunkworks/go-jira 2016-06-29 01:40:21 +01:00
Cory Bennett ab5c185bf3 make binary name .exe for windows 2016-06-29 01:26:28 +01:00
Cory Bennett 1cf943df13 update Makefile so it builds under cygwin on windows 2016-06-27 15:51:21 -07:00
Cory Bennett 1fef349ba2 fix build under Cygwin on Windows 2016-06-27 15:46:14 -07:00
coryb 42e787e042 Merge pull request #39 from mikepea/system_template_dir
Include templates from a system path
2016-03-30 14:47:17 -07:00
Mike Pountney cf10f53789 Include templates from a system path
I've found that several of the built-in templates need a bit of work
to be useful with our JIRA installation (eg #24), so this allows for admins
to make a site-specific set of defaults easily.
2016-03-30 20:20:55 +01:00
coryb 95403a4948 Merge pull request #38 from jglick/patch-1
Noting jira login
2016-03-30 08:48:21 -07:00
Jesse Glick e5053e88cd Noting jira login 2016-03-30 09:39:49 -04:00
coryb 964cf6b4c0 Merge pull request #37 from tobyjoe/add-resource-expansion
Added support for the ```expand``` option for Issues
2016-02-22 09:04:54 -08:00
tobyjoe fb4afc971a Added support for the ``expand`` option for Issues
The ```expand``` option is used to specify resource expansion in the
Jira REST API.

It's particularly useful for things like fetching the ```changelog``` of
an Issue.

This PR adds the support to the ```ListIssues``` and ```ViewIssue```
functions of the ```jira.Cli``` struct.

I'm happy to add tests, but there is currently no test suite in the
master branch, so I did not want to bog down the PR with tangential features.
2016-02-22 08:46:08 -05:00
Cory Bennett 7bfc6e810c change for api changes to go-logging 2016-02-11 15:11:06 -08:00
coryb 7ef8c4fe63 fix #36, build instructions needed updating 2016-02-10 17:03:27 -08:00
coryb b86921351a Merge pull request #35 from QuinnyPig/fix-readme
Fix path for installation instructions
2016-02-02 12:06:48 -08:00
Corey Quinn 4c51e5b1a6 Fix path for command 2016-02-02 11:19:54 -08:00
coryb e4fa47d48c Merge pull request #34 from jonathanio/fix/issuetypes-url-escaping
Fix issuetype calls adding URL escaping
2016-02-01 08:46:21 -08:00
Jonathan Wright e4a25e2ec2 Fix issuetype calls adding URL escaping
It is valid within JIRA to have issue types with spaces (for example we use
"Pro-Active Task") however the issuetype variable is not escaped prior to
formatting into the uri string.

This fix imports "net/url" and escapes all inclusions of issuetype into uri.
The only other variables formatted into uri are c.endpoint and issue which
shouldn't contain special characters.
2016-02-01 11:10:30 +00:00
Cory Bennett 47e9467de1 Updated Changelog 2016-01-29 09:04:49 -08:00
Cory Bennett a573c4e68e Merge branch 'master' of github.com:Netflix-Skunkworks/go-jira 2016-01-29 09:02:39 -08:00
coryb eb096f4cb3 Merge pull request #33 from mikepea/make_jirad
Fixes #32 - make path to cookieFile if it's not present
2016-01-29 09:01:29 -08:00
Mike Pountney 66445793e6 Fixes #32 - make path to cookieFile if it's not present
TL;DR, this ensures ~/jira.d is present, with 0755 perms.

If ~/jira.d isn't present, we can't write to the cookieFile, which
breaks CmdLogin. This is particularly an issue when using /etc/go-jira.yml
to get an entire team using go-jira easily :)

This fixes this by ensuring the cookieFile dir is present before
writing to it.
2016-01-29 11:12:25 +00:00
coryb 8190ad9925 Merge pull request #31 from mikepea/component_mgmt
Add component/components support: add and list for now.
2016-01-28 16:46:06 -08:00
Cory Bennett 2ec88ce5b0 Merge branch 'master' of github.com:Netflix-Skunkworks/go-jira 2016-01-28 16:42:08 -08:00
Mike Pountney d7b32269e1 Add component/components support: add and list for now.
This adds the basics of the component API:

* listing of components assigned to a project
* adding new components to a project.

The interface to 'add component' is similar to that of 'labels', as
previously discussed. We can implement remove/update later.
2016-01-29 00:22:26 +00:00
coryb cb67107a3e Merge pull request #30 from mikepea/unwatch_support
Support for removing a given watcher
2016-01-23 22:54:05 -08:00
coryb 3bf28d28e1 Merge pull request #26 from mikepea/vote_support
Add 'vote' and 'unvote'
2016-01-23 22:52:31 -08:00
Mike Pountney 383847a9d6 Tweak the CmdWatch contract and add watcher remove support
This adjusts the CmdWatch interface as per discussion in
https://github.com/Netflix-Skunkworks/go-jira/pull/26

It also exposes public versions of the c.getOptString and c.getOptBool
utility functions, again as discussed.

The interface to CmdWatch now includes the user to be watched (rather than
depending on the opt[] map. This makes CmdWatch more useful externally.

A '--remove' option has been created, to allow for removal of a given watcher.
This was deliberately not included in the defaults map, as it is specifically only
used for 'watch' command right now. It should be moved up to a default if it becomes
a more common option, I guess (as 'remove is false' isn't a bad default)
2016-01-24 03:00:39 +00:00
Mike Pountney 797edefc3f Amend vote/unvote to be vote/vote --down
This simplifies the interface to voting, as per the discussion in
https://github.com/Netflix-Skunkworks/go-jira/pull/26

Basically, DRY out the logic into a single CmdVote function based
around an 'up' bool. Similarly, make a single CLI command with an
option to do the downvote.
2016-01-24 02:23:08 +00:00
Mike Pountney 7b651d73c2 Merge branch 'master' into vote_support 2016-01-23 18:06:16 +00:00
Cory Bennett f6612c094b update version tag to prefix with v 2016-01-21 17:38:50 -08:00
Cory Bennett b0ed964e3e Updated Changelog 2016-01-21 17:36:23 -08:00
Cory Bennett ee0e780fa4 [issue #28] check to make sure we got back issuetypes for create metadata 2016-01-21 17:35:18 -08:00
Cory Bennett c5fe9f5383 gofmt 2016-01-21 10:52:15 -08:00
coryb 3f20139b75 Merge pull request #27 from blalor/insecure-skip-verify
Add insecure option for TLS endpoints
2016-01-21 10:15:29 -08:00
Brian Lalor 6a88bb9c00 Add insecure option for TLS endpoints
This gives the option of disabling TLS certificate verification for
the server.

Closes #25
2016-01-21 12:30:23 -05:00
Mike Pountney c95e66e081 Add 'vote' and 'unvote'
This adds support for voting on issues via CmdVote() and CmdUnvote()

Voting on issues is always done as the logged in user, it appears you
can't case a vote for another user:

https://docs.atlassian.com/jira/REST/latest/#api/2/issue-addVote

This required adding a cli.delete() handler, naturally with no content
(as per RFC2616)

This is ripe for DRY-ing out, but I will leave that for a future PR.

Worth noting is that you cannot vote for your own issues, this results in:

    2016-01-13T21:35:41.315Z ERROR [cli.go:184] response status: 404 Not Found
    2016-01-13T21:35:41.315Z ERROR [commands.go:439] Unexpected Response From POST:
    {snip}
    {"errorMessages":["You cannot vote for an issue you have reported."],"errors":{}}
2016-01-13 21:41:34 +00:00
coryb 6734532719 Merge pull request #21 from mikepea/label_command
Add 'labels' command to set/add/remove labels
2016-01-04 08:50:15 -08:00
Mike Pountney a637b43f0e Reporter is not generally editable.
Support the lowest common denominator for default_edit_template, as per #23

`reporter` is not usually editable by unprivileged users. Even if it is left as-is,
the PUT request is trying to update it, resulting in the following error:

    {"errorMessages":[],"errors":{"reporter":"Field 'reporter' cannot be set. It is not on the appropriate screen, or unknown."}}

Commenting out the field leaves the information visible, so is a reasonable compromise.
2016-01-03 22:25:05 -08:00
Mike Pountney 303784fd56 Correct naming of parameter: set/add/remove are actions.
'command' is not approprirate for the set/add/remove operations, and is
confusing. Rename to 'action' to remove this confusion.
2016-01-03 20:28:02 -08:00
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