Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

captain-log

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

captain-log - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

test

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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc