A toolbox of a GitHub organization's contributor community.
See a live instance (set up for Public Lab's community) at: http://code.publiclab.org/
Community Toolbox lets you view issues of a specific repository for embedding on another site, with the following URL:
http://code.publiclab.org/examples/embed.html#o=orgname&r=repository
For issues with a specific label, use, for example:
To embed these on your site, use an <iframe>
like this:
<iframe src="http://code.publiclab.org/examples/embed.html#o=orgname&r=repository" style="border:none;" width="100%" height="600px"></iframe>
You can also use Community Toolbox to display issues for a given label across an entire organization. Use all
for the r
parameter, like this:
http://code.publiclab.org/#r=all
These lines allow configuration of the example to set repository, organization and labels to use, by adding to the URL hash in the format: https://publiclab.github.io/community-toolbox/#r=all
(for the r
parameter, as an example). So the options are:
- repository - using
r=
you can set the repository name to look at, like: http://code.publiclab.org#r=plots2 for https://github.com/publiclab/plots2 - organization/user - using
o=
you can set the organization or user name to look at, like: http://code.publiclab.org#o=publiclab for https://github.com/publiclab - first-timers-only label - using
f=
you can set the label to use forfirst-timers-only
or equivalent issues, like: http://code.publiclab.org#f=help-wanted for https://github.com/publiclab/plots2/labels/help-wanted - first timers only "candidates" - using
c=
you can set the label to use forfto-candidate
or equivalent issues (at Public Lab, we keep a queue of not-quite-ready-but-almost issues for newcomers, that have key information but aren't completely formatted to welcome yet), like: http://code.publiclab.org#c=fto-candidate for https://github.com/publiclab/plots2/labels/fto-candidate
To develop and build out Community Toolbox, you'l need to have npm
installed and to run npm install
to get all the dependencies.
Community Toolbox is built using a Grunt task from the source files in /src/
, and the compiled file is saved to /dist/community-toolbox.js
. To build, run grunt build
. To watch files for changes, and build whenever they occur, run grunt
.
API calls are based on: https://www.npmjs.com/package/github-api-simple
-
Clone or download the repo. into any fresh temporary folder.
git clone https://github.com/publiclab/community-toolbox.git
-
Cd into that root folder you just cloned locally.
cd community-toolbox
-
Open terminal in the current folder and to install all dependencies type
npm install
Update to new version of packages if required in package.json.
-
Now go to the folder and open index.html in browser.
(testing is not yet implemented, but when it is, it'll probably work like this)
Assuming tape
is installed via npm install
:
npm test