UNPKG

grunt-repos

Version:

Grunt task to download a list of repos from GitHub's API

71 lines (64 loc) 1.06 kB
## namespaced list Add the list of repos to an array with the given property name. ```js grunt.initConfig({ {%= shortname %}: { options: { path: '/orgs/assemble/', namespace: 'assemble' }, files: { 'test/fixtures/data/helpers.json': ['repos?page=1&per_page=100'] } } }); ``` Returns: ```json { "assemble": [ { "id": 5916767, "name": "assemble", "full_name": "assemble/assemble", "owner": { "login": "assemble", "id": 2645080, ... } } ] } ``` ## no namespace Or just return the array of repos. ```js grunt.initConfig({ {%= shortname %}: { no_namespace: { options: { path: '/orgs/assemble/', namespace: false, }, files: { 'test/actual/no_namespace.json': ['repos?page=1&per_page=100'] } } } }); ``` Returns: ```json [ { "id": 5916767, "name": "assemble", "full_name": "assemble/assemble", "owner": { "login": "assemble", "id": 2645080, ... } } ] ```