Skip to content

Commit

Permalink
Kick-off the rust (#27)
Browse files Browse the repository at this point in the history
* [dist] Add .gitattributes for package-lock.json
[dist fix] Use 'make-promises-safe'

* [wip api] Attempt to improve debug logging.

* [api] Add debug logging with diagnostics.

* [wip api] Add support for Basic authentication.

* [wip api] Begin to plumb down query string parameters for pagination.

* [api wip] Define and consume a generic Paginator for any JIRA entity (Epic, Story, etc.)

* [api wip] Raw formatting for (actual) JSON.

* [fix] Begin the long process of updating all makeGetRequest calls.

* [fix] Make prior fix both backwards and forwards compatible.

* saving changes

* added total points and percent complete to describe sprint function

* changed output order from total then completed to completed then total

* add status command for simplied sprint report and formatting to display w/o issues

* reduce getIssueEpics

* [fix] Better logging. Use future sprints.

* remove unneeded console.log

* fixing nit picky edits, function optimization, and removal of unneeded commented lines

* remove shallow clone returns in statusEpic and describeEpic

* handling errors for describeEpic and statusEpic. streamlined output for completed and total points

* fixes from eslint

* run js lint & address comments

* add post test command to scripts

* reduce statusEpic() to call describeEpic

* added back in original content

* add error catches for jira client, remove unused formatting for components in epics

* added closed state to getSprints, so velocity is useful, and removed indexzero from TODO comments, so anyone can pick up the work

* [revert] Remove try/catch again since it simply rethrows.

* [revert] Re-add try/catch and make note of implications for #28.

* [refactor api] Migrate to prompts. Store authmode in `jiractl set-context`

Co-authored-by: Charlie Robbins <[email protected]>
  • Loading branch information
kquerna and indexzero authored Feb 13, 2020
1 parent 6475739 commit f14da4c
Show file tree
Hide file tree
Showing 20 changed files with 633 additions and 221 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.js eol=lf
package-lock.json binary
19 changes: 17 additions & 2 deletions bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env node

// Make. Promises. Safe.
require('make-promises-safe');

const configActions = require('../src/config.actions');
const epicActions = require('../src/epic.actions');
const epicsActions = require('../src/epics.actions');
Expand All @@ -12,6 +15,8 @@ const sprintsActions = require('../src/sprints.actions');
const teamActions = require('../src/team.actions');
const teamsActions = require('../src/teams.actions');

const debug = require('diagnostics')('jiractl:cli');

const opn = require('opn');
const tabtab = require('tabtab');
const argv = require('yargs')
Expand Down Expand Up @@ -87,11 +92,14 @@ async function main() {
action: handler,
formatters: {
json: formatters.json[context],
console: formatters.console[context]
console: formatters.console[context],
raw: formatters.raw
}
};
}

debug('Starting CLI:', { context, action, handler, argv });

try {
const output = await handler.action(argv);
handler.formatters[argv.output](output, argv);
Expand All @@ -102,6 +110,13 @@ async function main() {

main()
.catch(err => {
console.error(err);
if (err.statusCode) {
console.error(`${err.name}: ${err.statusCode}`);
// TODO: make this a debug log
// console.error(err.message);
} else {
console.error(err);
}

process.exit(1);
});
Loading

0 comments on commit f14da4c

Please sign in to comment.