captain-log
Advanced tools
Comparing version 0.1.0 to 0.1.1
11
index.js
const request = require('request') | ||
const async = require('async') | ||
const AUTH = process.env.CAPTAIN_LOG_API || '' | ||
@@ -21,2 +20,3 @@ function getIssues (config, callback) { | ||
console.log(`### ${config.title}`) | ||
// TODO if data is not array, complain, we have got an error | ||
data | ||
@@ -39,3 +39,3 @@ .filter(d => { | ||
if (config.prefix) { | ||
prefix += config.prefix | ||
prefix += ' ' + config.prefix | ||
} | ||
@@ -62,7 +62,10 @@ if (config.todo) { | ||
function createQuery (config) { | ||
return `https://${AUTH}@api.github.com/repos/${config.repo}/issues?${configToUrl(config)}` | ||
return `https://${config.auth}@api.github.com/repos/${config.repo}/issues?${configToUrl(config)}` | ||
} | ||
function runConfigs (configs) { | ||
function runConfigs (configs, auth) { | ||
async.forEachSeries(configs, (config, done) => { | ||
if (!config.auth) { | ||
config.auth = auth || '' | ||
} | ||
getIssues(config, function (err, data) { | ||
@@ -69,0 +72,0 @@ display(config, data) |
{ | ||
"name": "captain-log", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "The log from your favorite captains", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,6 +6,42 @@ # captain-log | ||
See/Run the demo.js | ||
## Install | ||
``` | ||
npm install captain-log | ||
``` | ||
## Usage | ||
``` | ||
const captain = require('captain-log') | ||
captain([{ | ||
title: 'What happened (ongoing)', // This will be the title of this group of issues | ||
repo: 'ipld/specs', // this is the repo to get these from | ||
state: 'open', // want open issues or closed ones? | ||
labels: [], // any label to filter? | ||
exclude_labels: ['needs spec'], // any label to exclude? | ||
todo: true, // want to show the list as a todo? | ||
since: '2016-09-10T12:00:00Z', // want to get them from a particular time? | ||
exclude: [13], // want to exclude a particular issue? | ||
prefix: ':tada:' // wants to prefix each issues with a special emoji 🎉? | ||
}]) | ||
``` | ||
will output | ||
``` | ||
### What happened (ongoing) | ||
- :tada: [ ] #19 : Idea for permanent mutable links | ||
- :tada: [ ] #14 : Adding Introduction, Abstract and Scope | ||
- :tada: [ ] #12 : Skeleton of IPLD v1 spec | ||
- :tada: [ ] #4 : Selectors: Use cases (from Q3 Workshop) | ||
``` | ||
## Quick history | ||
I learned the practice of writing a captain.log from [@daviddias](https://github.com/diasdavid/) in his work on `js-ipfs` (see his [really cool log](https://github.com/ipfs/js-ipfs/issues/30)). When I started my [captain.log](https://github.com/ipld/specs/issues/13) I found really useful to list all the different issues that are open, closed, that need a spec that had something happening & so on. This process is very slow for humans but fast for machines :) | ||
## License | ||
MIT |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
6884
7
125
47
0