Commit Graph

61 Commits

Author SHA1 Message Date
Judson Lester e3f29d4884 Merge pull request #395 from seanblong/bug/remove-login-loop
Remove (possible) infinite loop from CmdLogin.
2022-10-13 10:11:48 -07:00
Andrew Somerville b3723c7b63 wrap token comparisons in a function, proliferate it virtually everywhere apk-token was, and fix some related tab/space issues 2021-11-21 01:21:26 -05:00
Rodney Lorrimar fedc66614f Add authentication-method: bearer-token 2021-08-03 13:02:38 +08:00
Ron Green 298a637f8c fix rebase issue 2021-05-05 08:40:24 -04:00
seanblong 1c55c069d3 Remove (possible) infinite loop from CmdLogin. 2020-11-16 19:59:13 -08:00
Evan Gates f7587f43f1 block: reverse order of arguments
The BLOCKER and ISSUE arguments for the block command were incorrect.
With hypothetical ticket names BLOCKER and ISSUE, calling

	jira block BLOCKER ISSUE

resulted in

	ISSUE blocks BLOCKER
	BLOCKER is blocked by ISSUE

which is the reverse of the documentation which claims it should be

	BLOCKER blocks ISSUE
	ISSUE is blocked by BLOCKER

Reverse order of the arguments so the documentation matches the
actual usage.  This does not break existing usage, only updates the
documentation.

Fixes #383
2020-10-01 13:48:18 -04:00
Keien Ohta 6fbc522ee7 also use login for subtask 2020-09-15 13:31:17 -04:00
Keien Ohta c2abbd9864 update templates with emailAddress and login
go-jira/jira#369
2020-09-15 13:31:17 -04:00
Alan Voiski 42e5d23f63 Ensure body is NPE safe 2020-09-07 16:24:45 -04:00
Alan Voiski b572037cfe Support empty responses in request commands
Avoid JSON parser when the response is empty - common cases for HTTP 204 in issues deletion, or moving issues to sprint.
2020-09-07 16:24:45 -04:00
ldelossa 3c1c4d95e1 transition: map field name to id
this commit allows a user to use the more friendly field.Name when
transitioning to states which require custom field inputs.

Signed-off-by: ldelossa <ldelossa@redhat.com>
2020-08-28 22:06:46 -04:00
ldelossa 6a27e28c61 username-deprecation: use email and display names
this commit deprecates the searching ability by username and
instructs user to provide email or display names in commands.

the username parameter has been deprecated completely from v2 and v3
api

Signed-off-by: ldelossa <ldelossa@redhat.com>
2020-08-28 17:59:14 -04:00
Cory Bennett a26683e01d update all usage of user.name to user.accountId for privacy migration:
https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/
2020-02-23 23:59:39 -08:00
Cory Bennett d002d7fe74 allow issues on command line to automatically prefix with project when defined 2019-12-01 16:29:35 -08:00
Mike Pountney 27f57b2bbe Switch over to using github.com/go-jira/jira, from gopkg.in
There should be no reason to use gopkg.in versioned imports now that
we're using go modules. I think, IANAE.

gopkg.in kind of gets in the way of modules, as it only pulls over
tagged releases from github.com -- this then means that you need to use
go modules 'replace' syntax in the go.mod to use a non-versioned commit
or branch. This is feasible, but kind of ugly.

go modules defaults to pulling the latest version, so the default
behavior is the same as when pulling go-jira.v1 from gopkg.in.
2019-09-14 21:31:11 -07:00
Daniel Martí 31c113d1ba all: unindent some code 2019-05-28 11:01:51 +01:00
Daniel Martí 9bcdcc128f don't use ReadAll when decoding JSON
An empty stream isn't valid JSON, so we shouldn't silently ignore it.
2019-05-27 13:09:31 +01:00
Daniel Martí 9b9186f7d4 start making staticcheck happier 2019-05-27 10:49:15 +01:00
Daniel Martí 664c5cad24 CI: test on Go 1.12.x, cleanup
We can also use the apt addon to install packages. We also don't need
fast_finish, since we don't use allow_failures anywhere.

Finally, the 'go get' line was pointless, as all dependencies are
vendored, and 'go test' will catch build failures.
2019-05-26 21:34:53 +01:00
Cory Bennett 36c99ce040 make automatic pagination on search optional, fix tests 2019-05-25 17:06:03 -07:00
CodeLingo Bot 23ac11872b Fix function comments based on best practices from Effective Go
Signed-off-by: CodeLingo Bot <bot@codelingo.io>
2019-02-28 21:20:03 +00:00
Cory Bennett f5921077ca [#196] add jira session command to show session information if user is authenticated 2018-07-29 14:54:21 -07:00
Cory Bennett 9ebd2cd64e fix IsTerminal usage for windows 2018-05-24 00:23:15 -07:00
Cory Bennett 09a61c3ea1 only prompt on logout if stdin and stdout are terminals 2018-04-15 17:15:48 -07:00
Cory Bennett 64ce3812a6 only prompt on logout if stdin is an active terminal 2018-04-15 17:07:01 -07:00
Cory Bennett 9146346e2f [#163] fix url path join logic 2018-04-15 16:56:09 -07:00
Cory Bennett bd3cf994b8 [#160] allow jira logout to delete your api-token from keychain 2018-04-03 09:21:52 -07:00
Cory Bennett edb06621f8 [#148] [#149] add support for api token based authentication 2018-03-08 10:58:04 -08:00
Cory Bennett 43ebc846b1 refactor to simplify main 2018-03-06 22:36:32 -08:00
C Anthony Risinger 6da9974380 Update unexportTemplates.go
Logic error, `-d` can be set but was never used.
2018-01-19 13:29:21 -06:00
Cory Bennett 464742c9ba field name is "comment" not "comments" 2017-12-13 11:09:25 -08:00
Cory Bennett 9597f9b56f fix transition comman 2017-10-28 14:46:50 -07:00
Cory Bennett c9b5054cde fix default values to load after parsing configs 2017-10-28 14:23:27 -07:00
Brian Lachniet fd399d817e Fix typo in 'logout' command help 2017-10-28 11:04:02 -04:00
Ivan Andrus 4ed8edbd19 Add --resolution option 2017-10-13 12:22:12 -06:00
Cory Bennett 3913726991 update edit command to set queryFields on search to match what is used in template 2017-09-19 00:27:11 -07:00
Cory Bennett 0ba8aa035b fix edit with query loop, allow continuation when not submitting previous issue 2017-09-18 14:45:21 -07:00
Cory Bennett 4c6b36c83a fix edit 2017-09-17 20:32:50 -07:00
Cory Bennett cd3cfd820f fix usage message 2017-09-17 20:30:44 -07:00
Cory Bennett 3e8b9bd9f5 need issuetype to use the default list table template now 2017-09-17 16:15:00 -07:00
Cory Bennett c9d8dfbe55 [#102] add issuetype into the default queryfields and add it to the default table list template 2017-09-17 15:49:05 -07:00
Cory Bennett 66eb7bff38 [#100] add support for posting, fetching, listing and removing attachments 2017-09-17 15:18:06 -07:00
Cory Bennett 893454fc69 [#87] add various commands for interacting with epics 2017-09-15 00:28:56 -07:00
Cory Bennett 00cba793ad tweaks for templates in named queries to work better 2017-09-13 12:17:59 -07:00
Cory Bennett fb43753c31 [#99] add support for named queries to be stored in configs 2017-09-13 11:12:58 -07:00
Cory Bennett 5da04c1f86 [#98] add --status option for JQL filter on status with list command 2017-09-13 00:12:20 -07:00
Cory Bennett 608e586d1c use --gjq for GJson Query to filter json response data, remove --jq option 2017-09-10 22:48:40 -07:00
Cory Bennett 1d269183c3 add --jq option to run a json query against Jira service response json 2017-09-09 19:02:23 -07:00
Cory Bennett e6faee1573 [#66] add --started option to jira worklog add to change the start time for worklog 2017-09-06 22:30:15 -07:00
Cory Bennett c4be59cae3 [#45] automatically add comment to issue even if transition does not support comment updates during transtion 2017-09-06 21:28:57 -07:00