Skip to content

Instantly share code, notes, and snippets.

@doowb
Created June 23, 2013 18:48
Show Gist options
  • Save doowb/5846064 to your computer and use it in GitHub Desktop.
Save doowb/5846064 to your computer and use it in GitHub Desktop.
Example of setting up grunt-github-api to get all public assemble repos.
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
// Project metadata
pkg: grunt.file.readJSON('package.json'),
jshint: {
all: [
'Gruntfile.js'
],
options: {
jshintrc: '.jshintrc'
}
},
github: {
options: {
},
repos: {
options: {
filters: {
'type': 'public'
}
},
src: '/orgs/assemble/repos',
dest: 'assemble-public-repos.json'
}
}
});
// Load npm plugins to provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-github-api');
// Default task.
grunt.registerTask('default', ['github']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment