Skip to content

Commit

Permalink
Merge pull request #96 from ipfs/feature/githubLabels
Browse files Browse the repository at this point in the history
Added repos tools
  • Loading branch information
daviddias committed Jan 23, 2016
2 parents e3a4797 + 86fd298 commit 08cee0d
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
18 changes: 18 additions & 0 deletions dev/tools/github/githubLabels.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"name": "needs review",
"color": "0052cc"
},
{
"name": "difficulty:easy",
"color": "bfe5bf"
},
{
"name": "difficulty:moderate",
"color": "bfe5bf"
},
{
"name": "difficulty:hard",
"color": "bfe5bf"
}
]
24 changes: 24 additions & 0 deletions dev/tools/github/repos.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// This script basically copies any labels from githubLabels.json
// to every repo specified below. It is simple, but it works.
//
// ## Install
// `npm i -g github-labels`
// Add repos to repos[]

const exec = require('child_process').exec
const githubRepos = require('github-repositories')

githubRepos('ipfs').then(data => {
// manually specify data here if needed
return data.map((item) => {
exec('labels -c githubLabels.json ' + item.full_name,
(error, stdout, stderr) => {
console.log(`stdout: ${stdout}`)
console.log(`stderr: ${stderr}`)
if (error !== null) {
console.log(`exec error: ${error}`)
}
}
)
})
})

0 comments on commit 08cee0d

Please sign in to comment.