Closed tdshipley closed 5 years ago
Sure - are there any existing tests for the JIRA reporter or Options classes? I cannot find any.
Probably not, this is why I'm asking :) Trying to make test coverage a bit better!
Ah ok - no problem will add a few tests and ping you once it is done.
@omerlh - Added a couple of tests for the jira_issue_type method I added. Testing the rest of the JiraReporter class would probably need some refactoring (or at least mocking the Jira Client) which seemed like a lot of work for this change!
Also didn't test the options class. Not sure how I would go about that in a way that would add value. Perhaps adding a test which checks a options object for shape? Anyway another one best left to you guys I think.
Hey, @omerlh is there anything else I need to do to get this merged? Keen to move my security testing pipeline on from its current form (zap, depcheck) to the new (zap, depcheck + glue and jira) but this would block it for me.
Sorry, I thought you can merge it yourself. Merged, thanks!
👍 thanks
Summary
Currently, Glue assumes when raising issues that they should be of type Bug. However not all JIRA projects might have this issue type so Glue should support overriding this if required.
Change
Added an option --jira-issue-type to allow a user to pass in the issue type they want to be used when the JIRA reporter raises issues in JIRA. If this is not set it uses the default value Bug.
cc @omerlh