Skip to content

Instantly share code, notes, and snippets.

@andrew
Last active December 15, 2015 11:39
Show Gist options
  • Save andrew/5254522 to your computer and use it in GitHub Desktop.
Save andrew/5254522 to your computer and use it in GitHub Desktop.
# name: Github
# description: search github
# keyword: github
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