Giter VIP home page Giter VIP logo

jira-cli's People

Contributors

behuti avatar dancrumb avatar dependabot[bot] avatar goldcaddy77 avatar iinuwa avatar miguelmich avatar nathanpbell avatar renato-bohler avatar vincenthokie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jira-cli's Issues

GPDR strict mode

I see then when invoking jira user
(node:14984) UnhandledPromiseRejectionWarning: StatusCodeError: 400 - {"errorMessages":["The query parameter 'username' is not supported in GDPR strict mode."],"errors":{}}
Anything I can do to work around it?

Add support for switching accounts

Like @fluffels pointed out in #6, it would be great to have an option to setup multiple instances of JIRA and be able to switch between them, I suggest to add support inside the main config file because it's a better way to centralize the general settings.

`jira issue $ISSUE_NAME` -> TypeError

~$ jira issue $ISSUE_NAME

  TypeError: Cannot read property 'length' of undefined

~$

Just took a very quick look at the source, maybe it's coming from

jira-cli/src/issues.js

Lines 287 to 295 in f75d6ea

// Fixes versions
if ( issue.fields.fixVersions.length ) {
let versions = [];
issue.fields.fixVersions.forEach(function( version ){
versions.push( version.name );
});
table.push( { 'Fix Versions:': versions.join( ', ' ) } );
}

Support for searching issues passing a JQL query

I'm just proposing that a feature be added to pass queries to commands like jira i or jira s to filter the results. Perhaps something like:
jira i -q "project in (P1, P2) and type in (task, \"User Story\") order by key asc"

I admit I don't know if this is possible through the API.

Access to local hosted server with token fails unless anonymous

Hi, Using curl/httpie (https://httpie.io) I can access our local self hosted instance, with bearer token. However jira-cli fails.

I've tried using the token and password with jira-cli, also with no username and with a username, i.e. with this .jira-cli.json.

{"protocol":"https","host":"host.name.org","username":"username","password":"MYTOKEN","apiVersion":"2","strictSSL":true}

Note if I remove the user and password, as follows, anonymous access works with jira-cli:

{"protocol":"https","host":"host.name.org","apiVersion":"2","strictSSL":true}

Then jira p, returns a few results, with no error:

 $  jira p
                                            
  Key    Name                                 
  DLM    Document Library Maintenance         
  ELPM   E-Learning Presentation Maintenance  
  SELM   Spanish E-Learning Maintenance       

As I said this script using httpie in bash works:

HOST=https://out.host.org
TOKEN=MY_API_TOKEN

https GET "${HOST}/rest/api/2/project" -A bearer -a "${TOKEN}"

What am I doing wrong? Or is this an issue with self hosting (I have no access to change the local host config :-(

1.2.1 is a breaking change

Hello πŸ‘‹

10 months ago I made a companion app for jira-cli – jira-config. The intention is to make it possible to have more than one configuration for jira-cli, however >1.2.1 will no longer work because the configuration file name has changed (which it depends on).

I just wanted to let you know! :-)

Also, maybe you want this feature as a part of jira-cli? I can help out :)

EDIT: Forgot the most important thing: Thank you very much for an awesome package, it's been a part of my local dev environment for over a year and works great!

Json (yaml) structured output.

Hello, first of all thank you for this awesome tool. I would like to ask whether it is possible to output e.g. jira issue show DS-1234 in a json format (or yaml) instead of unstructured output. I was not able to find it in documentation, however I would expect that jira API is returning some json anyway, so I would expect this functionality to be working. Thank you.

Installing with pnpm shows issues with package.json

###
### The "request" library is not installed automatically anymore.
### But is a dependency of "request-promise".
### Please install it with:
### npm install request --save
###

/Users/tyler.thrailkill/.node/pnpm-global/2/node_modules/.registry.npmjs.org/request-promise/4.2.4/node_modules/request-promise/lib/rp.js:23
    throw err;
    ^

Error: Cannot find module 'request'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
    at Function.Module._load (internal/modules/cjs/loader.js:529:25)
    at Module.require (internal/modules/cjs/loader.js:657:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at /Users/tyler.thrailkill/.node/pnpm-global/2/node_modules/.registry.npmjs.org/request-promise/4.2.4/node_modules/request-promise/lib/rp.js:11:16
    at module.exports (/Users/tyler.thrailkill/.node/pnpm-global/2/node_modules/.registry.npmjs.org/stealthy-require/1.1.1/node_modules/stealthy-require/lib/index.js:62:23)
    at Object.<anonymous> (/Users/tyler.thrailkill/.node/pnpm-global/2/node_modules/.registry.npmjs.org/request-promise/4.2.4/node_modules/request-promise/lib/rp.js:10:19)
    at Module._compile (internal/modules/cjs/loader.js:721:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Module.require (internal/modules/cjs/loader.js:657:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/tyler.thrailkill/.node/pnpm-global/2/node_modules/.registry.npmjs.org/jira-cl/1.2.1/node_modules/jira-cl/lib/jira.js:43:23)
    at Module._compile (internal/modules/cjs/loader.js:721:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Module.require (internal/modules/cjs/loader.js:657:17)
    at require (internal/modules/cjs/helpers.js:20:18)

It appears that the request library needs to be added to package.json.

jira issue create: seems like an invalid command

The documentation lists two ways to create an issue:

jira issue create and jira create.

When I run the first form, jira issue create, I get an error:

Error: Issue does not exist or you do not have permission to see it.

I assume the docs are out of date?

Can't connect because I'm behind corporate proxy

Hey! First of all, this project looks awesome πŸ˜„ but I'm trying to use this CLI at work, but the proxy is messing everything up.

I've installed jira-cl, configured my credentials via jira command and when I type jira i I'm given the following error message:

> jira i
> (node:14832) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'length' of undefined
> (node:14832) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

When I try jira u the error message is slightly different:

> jira u
> (node:14871) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): StatusCodeError: 407 - "<PROXY FAIL PAGE CONTENT>"

Parameters for jira create

I would like to pass parameters to jira create, so instead of going over the interactive options:

❯ jira create
? Project:  Ops
? Issue type:  Task
? Please provide the issue name : Set up Jira CLI

New issue: OPS-7829

I would type a more direct:

❯ jira create -p OPS -t task -m "Set up Jira CLI"

Thanks!

Can't assign issue with GDPR strict mode on

When trying to assign an issue I get the following error:

Error: 'accountId' must be the only user identifying query parameter in GDPR strict mode.

A small change to PR #51 would probably make this a fairly quick fix.

jira create hangs after prompting in powershell/cmd (works via bash)

To be clear doesnt appear windows platform per se, as using bash via windows works fine.

Commands like "jira search", etc, work fine via powershell or cmd.exe

  1. Invoke "jira create"
  2. jira prompts for "? Project: "
  3. Accept default choice, press Enter
    ACTUAL
    ---> appears to "hang", any keyboard input appears ignored.
    ---> ctrl+break will lead to "terminate batch job (y/n)"
    EXPECTED
    ---> accepts value and leads to next prompt

Interestingly... when I first attempted and ran "jira" and it began initial config it led me through all the prompts and only hung after the very last one. Pressing ctrl+break aborted it, but the "~/.jira-cli.json" had been successfully created. This seems relevant in case it's a more generic issue with the "prompt the user"

Unable to access boards

Looking at the documentation on Boards - https://docs.jiracli.com/#general_boards there is nothing clear on how to access a particular board. As it stands the jira command on lists all issues without the ability to filter based on status and I think that being able to view by boards would be useful.

"npm WARN" deprecated dependencies listed when installing

Repro steps:

  1. open a zsh terminal application on MacOS, running node v14.15.4 and npm v7.19.0 (other versions of node and npm may also work)
  2. run: npm install -g jira-cl
  3. See the following multiple "WARN" messages:
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.

added 282 packages, and audited 283 packages in 14s

jira show [ISSUE] shows raw text and markup

When showing an issue in the console, the raw text is shown including markup characters.

Since the markup is minimally invasive, this isn't an issue most of the time. With URL's however, this can pose a bit of an issue.

In the raw text, a URL is represented by the markup [link text|URL]. When link text is not explicitly set by the user, the link text is the same as the URL, resulting in [URL|URL]. For example:

[http://example.org/foo|http://example.org/foo]

My console sees this as the URL http://example.org/foo|http://example.org/foo and sends my browser to a non-existing page.

It would be nice if jira-cli could pre-process the markup language and render a console friendly representation.

Note: when the user sets a link text that doesn't look like a URL, this markup doesn't cause an issue.

[Example|http://example.org/foo]

My console correctly sends me to http://example.org/foo when clicking the link.

Trouble installing after cloning

I cloned the project and when I run "npm install" I get an error when babel is being executed:

` rimraf lib && babel src --out-dir lib

src/boards.js -> lib/boards.js
src/config.js -> lib/config.js
src/index.js -> lib/index.js
SyntaxError: src/issues.js: Unexpected token, expected ; (502:31)
500 | * Add comment to issue
501 | */
502 | addComment( issueId, comment ){
| ^
503 | return jira.api.addComment( issueId, comment ).then(function (res) {
504 | console.log(' Issue ' + issueId + ' successfully updated with comment:\n ' + comment);
505 | }).catch(function (err) {
`
I wanted to add some options that are in my jira environment, but I'm having trouble compiling the project :/

Are there any place where I can see the steps required to run the project when you clone it?

SSO accounts

I'm not able to authenticate with the current user/pass combo since my jira instance uses SSO. How do I log in with SSO?

Jira connect does not work properly

I need to connect to a Jira behind a corporate firewall. Additionally, there are separate instances via a special suffix. I assume that suffix has to be appended.
Also i had to manually add the https protocol, as the config did not set it in the wizard. Also the setting later did work not always right. Anyways: If i then connect, i get the following error message, but no detailed message:

Error retreiving issues list: 401: Unable to connect to JIRA during search.

Is there a way to get a better error log?

Thx

Allow to select user when assigning an issue

Command -
jira i <issueId> -a <user>
Requirement -
It should allow to present the list of users matching user parameter as most of the time we don't know the exact user name. The list to be presented as selectable options.

Unable to create issue due to additional required fields

What it should do

Find required fields, and allow inputting required ones

What it does

Fails to create a new issue because some fields are required for new issues on our Jira projects.

Other Info

After looking into the Jira API a bit, the expand query string can be set to get all fields on an issue type. However, with many projects this can be massive. I would suggest waiting to fetch a more detailed set of metadata until after the user has selected the project at the very least, maybe even better to wait until they have selected the type. The request can then be filtered down by project name and issue type to limit the returned data (see https://docs.atlassian.com/software/jira/docs/api/REST/8.1.2/#api/2/issue-getCreateIssueMeta)

Encrypt config file

When ask the user for initial config data also prompt a password field to encrypt the file.

log time on issue

is there a way to log time for an issue?

also is there a way to see all the options for a given command?

Basic auth fails

Like #23 my login is failing, but unlike #23 a reset of the password doesn't work.

Currently I am encountering the same issue, where all attempts at logging in with basic auth is failing over curl. I've tried resetting my password, using curl, but it appears that basic auth fails with my org. Is there any way you could add support for api keys? I think that might fix the issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.