Skip to content

Commit

Permalink
Merge branch 'release/v0.1.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelbinar committed Jan 31, 2019
2 parents c743fb2 + c23939c commit cda42f8
Show file tree
Hide file tree
Showing 8 changed files with 2,639 additions and 2,501 deletions.
17 changes: 5 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,16 @@ os:
- linux
- osx
node_js:
- 8
- 7
- 6
- node
- 8
- "10.15.0"
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.10.1
- export PATH=$HOME/.yarn/bin:$PATH
- yarn global add greenkeeper-lockfile@1
install:
- yarn install --ignore-engines
cache:
yarn: true
- npm install -g greenkeeper-lockfile
before_script: greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload
after_success:
- yarn cover
- ./node_modules/.bin/codecov
- npm run cover
- npx codecov
env:
global:
secure: eGptEeBpj9rsGNLF6cqvXsclE6QBCWABReVPq5ueQ0LqeE8/bXKKDoIWSkFL105Zk0grqUiMRESfIr7CWFyFlT75MhE1/QfKsGtNtJoZ4FQMb/a85VjQLBWEX9Nr34+R+FMv3a2HY49SuFhFcyndSbPZ4vc3lV48+gV/QzbKT2vNSjgH2wQrMlqgkg3Sg8sghdaVsKWsd3TxLX+PvfZD23M+bYMf1CGO0bub4kUuAZ+EfTi+nVFE5XQVZP5Ln8Ypwy8FyftxBIiYu6DkuXoGoBZxr9Ov70ANCIJeDsAhRioDSJ/33VtgSuBLjEoBgZsrdSet5q95/t4iPdzqfQlqTJvJ1uhwdWP/OdiH6Eip+elLGb4m1xaLMjCyCGY1FL5RnafCYRFsyIZWE2H1qQnOrd4gnfZx03Yrmg6ZnodyqvEp8sVvLxl5aWiiv9QMlTK1s6z23I9g1zx3kYcY0vBvdgEFCG/1vmD0dqK3A3/wr58EVeR01nj+pbqeJtnXk1bu9eTV2p9YpVsHpjM33sqwXtqoPegCGGuAsLyWoszjfK6ZhEMLS7T8Wlf8ECACd60u/5T+d7rOqhfCaCdkXu4kZczpZ9EeFBTpuHPRFDEvTNka35HXoFoY8c0TXY0zE3wSJL7xubKVPO/lFjsPREuQXxTOcSvnNxLQrL4+wjjQW9w=
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,12 @@ Command line application allowing you to download all issues in the CSV format f

## Requirements

- [Node.js](https://nodejs.org) `v8.10.0 LTS` (tested on versions `6`, `7`, `8` and `latest`)
- [Yarn](https://yarnpkg.com) `1.10.1`
- [Node.js](https://nodejs.org) `v10.15.0 LTS` (tested on versions `6`, `7`, `8` and `latest`)

## Installation

Via `npm`

npm install -g git-issues-downloader

Via `yarn`

yarn global add git-issues-downloader

## Usage

git-issues-downloader <repository URL>
Expand All @@ -42,24 +35,24 @@ Example with username and password

git clone [email protected]:remoteorigin/git-issues-downloader.git
cd git-issues-downloader
yarn install
npm install

### Run Project

yarn start
npm start

### Tests

All tests are are written in [Mocha](https://mochajs.org/) and stored in the `test` folder.

yarn test
npm run test

### Linting

Using [Standard](https://github.com/feross/standard) JavaScript linter & automatic code fixer.

yarn lint
npm run lint

Automatically fix linting issues

yarn lint:fix
npm run lint:fix
10 changes: 4 additions & 6 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ const outputFileName = argv.filename
// callback function for getting input from prompt

const getAuth = function (auth, silent, callback) {
read({prompt: `${auth}: `, silent: silent}, function (er, password) {
read({ prompt: `${auth}: `, silent: silent }, function (er, password) {
callback(password)
})
}

// callback function for getting requested options

const getRequestedOptions = exports.getRequestedOptions = function (username, password, url, callback) {
const requestOptions = {
headers: {
Expand Down Expand Up @@ -86,14 +85,13 @@ const getRequestedOptions = exports.getRequestedOptions = function (username, pa
const main = exports.main = function (data, requestedOptions) {
logExceptOnTest('Requesting API...')
requestBody(requestedOptions, (error, response, body) => {
linkObject = responseToObject(response.headers)
const linkObject = responseToObject(response.headers)

if (error) {
chalk.red('There has been an error requesting data from GitHub')
console.error(error)
}

const linkObject = responseToObject(response.headers)

// take body, parse it and add it to data

data = _.concat(data, body)
Expand Down Expand Up @@ -211,4 +209,4 @@ function logExceptOnTest (string) {

const argvRepository = argv._[argv._.length - 1]

this.execute(argvRepository)
execute(argvRepository)
Loading

0 comments on commit cda42f8

Please sign in to comment.