Disclaimer: This is not an official Google product.
Organizing the issues in your GitHub repositories can be a different kind of animal, that's why you need LabelCat.
LabelCat is a NodeJS app that uses Google's Prediction API to automatically label GitHub Issues as they are created. Who taught LabelCat this trick you ask? You did...or rather, you will. Once deployed, you must train LabelCat on previously labeled issues, preferably from a variety of well-labeled repositories.
These instructions show how to run LabelCat on Google Cloud Managed VMs for maximum ease-of-use and scalability, but LabelCat can be deployed virtually anywhere.
While many Google Cloud Platform Node.js samples are small and simple, focusing on a single concept or piece of functionality, there aren't many full-blown Node.js apps to look at and tinker with. LabelCat fills the void somewhat by showcasing a larger Node.js app that addresses a number of production concerns. As such LabelCat is an excellent resource as you build your own production Node.js applications on Google Cloud Platform.
Built by @jmdobry
- A NodeJS Web API + worker
- An Angular + Material UI frontend
- Deployment instructions
- Detailed documentation of every piece
As an exercise, try swapping out the backend or frontend with something you write yourself.
- Install Node.js >= 4.x
git clone https://github.com/GoogleCloudPlatform/LabelCat
cd LabelCat
npm install
cp config.default.js config.js
(config.js
is where you customize the app)- Modify
config.js
as necessary.
LabelCat uses GitHub OAuth to authenticate users. Create an individual developer application if you intend to use LabelCat on repositories owned by your GitHub user. Create an organization developer application if you intend to use LabelCat on repositories owned by an organization that you administer.
Individual Application: Go to https://github.com/settings/developers to register a new individual application.
Organization Application: Go to
https://github.com/organizations/<organization>/settings/applications/new
.
Replace <organization>
with the name of your organization.
Register the Application:
- Click "Register new application"
- Enter application name, e.g.
Foo LabelCat
- Enter homepage URL, e.g.
https://labelcat.appspot.com/
- Optionally enter application description
- Enter authorization callback URL, e.g.
https://labelcat.appspot.com/auth/github/callback
- Click "Register application"
- Copy the generated
Client ID
andClient Secret
into theconfig.js
file that you created earlier
The Google Cloud Platform provides a $300 free trial for new accounts, enough to run the app for a "long time" (TODO: Update for accuracy).
- Register at https://console.developers.google.com/freetrial
- Create a new Project
- Enable the Predictions API, Datastore API and PubSub API for your new project
- Go to "Credentials", create a new Service Account and download the generated key file
- Install the Google Cloud SDK
gcloud preview app deploy app.yaml worker.yaml --promote
See CONTRIBUTING.
Copyright 2015, Google, Inc.
Licensed under the Apache License, Version 2.0
See LICENSE.