Skip to content

Instantly share code, notes, and snippets.

@andykent
Forked from andrew/github.coffee
Created March 28, 2013 00:35
Show Gist options
  • Save andykent/5259513 to your computer and use it in GitHub Desktop.
Save andykent/5259513 to your computer and use it in GitHub Desktop.
# name: Github
# description: search github
# keyword: github
bolt.run ->
if command.hasQuery
log command.query
url = "https://api.github.com/legacy/repos/search/#{command.query}?callback=?"
http.getJSON url, (data) ->
log data
if data.data.repositories
for item in data.data.repositories
log item
result
title: utils.sanitize(item.name)
description: utils.sanitize(item.description)
action: actions.open(item.url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment