Code Monkey home page Code Monkey logo

alfred-github-workflow's Introduction

Alfred Github Workflow

Heavily inspired (some might say copied /shrug) by https://github.com/edgarjs/alfred-github-repos.

Benefits of using this workflow:

  • Fuzzy query filtering
  • The refresh action isn't triggered if you mistype a repo name and press enter
  • Repos are loaded asynchronously and much faster

Installation

Find the latest workflow file over in the releases tab or click here to download it directly. Double-click the file and it will install the workflow.

Setup

To create the API token needed by this workflow:

  1. Go to the Personal access tokens page
  2. Click Generate new token (might have to confirm password)
  3. Give a descriptive name (like alfred github workflow) for reference later
  4. Select repo
  5. Select read:org
  6. Click Generate token
  7. Copy the token value
  8. In Alfred enter gh-auth with a space and paste the token. Should look like: gh-auth ACCESS_TOKEN_HERE

picture of priveleges for the access token

Your repos should be loaded automatically. If you ever want to refresh the list of available repos, you can enter gh-refresh and it will update the repo list in the background and notify when it is done.

TODO

Listed in order of what I want

  • allow public repos to be searched for by the name of the user/org followed by a slash
    • make sure to cache the response for filtering
  • Add alternative action to copy the link for SSH / HTTPS for easy cloning
  • allow users/orgs to be added in the environment variables section so that they are always loaded even on refresh
  • see your own notifications, pull requests, issues?
  • maybe some other actions to get pull requests, issues, etc?

Development

Install libraries with:

./install-libraries.sh

alfred-github-workflow's People

Contributors

mrnagoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mrnagoo lampo

alfred-github-workflow's Issues

'NoneType' object is not iterable

image

[10:44:22.993] ERROR: Github[Script Filter] Code 1: .
10:44:22 workflow.py:2057 DEBUG    ---------- Github ----------
10:44:22 workflow.py:1579 DEBUG    data `token` stored as `cpickle`
10:44:22 workflow.py:1594 DEBUG    stored data loaded: /Users/didier/Library/Application Support/Alfred/Workflow Data/com.matthewmcg.github/token.cpickle
10:44:22 workflow.py:1565 DEBUG    no data stored for `repos`
10:44:22 workflow.py:2074 ERROR    'NoneType' object is not iterable
Traceback (most recent call last):
  File "/Users/didier/.config/Alfred/Alfred.alfredpreferences/workflows/user.workflow.62D47871-8A59-47C4-A9A2-8D4D80117EF6/workflow/workflow.py", line 2067, in run
    func(self)
  File "github.py", line 91, in main
    repos = get_repos(wf, token)
  File "github.py", line 73, in get_repos
    return load_repos(wf, token)
  File "github.py", line 64, in load_repos
    repos = get_all(token)
  File "github.py", line 52, in get_all
    futures = [pool.submit(request,token,url) for url in urls]
TypeError: 'NoneType' object is not iterable
10:44:22 workflow.py:2097 DEBUG    ---------- finished in 0.781s ----------
[10:44:23.969] ERROR: Github[Script Filter] Code 1: .
10:44:23 workflow.py:2057 DEBUG    ---------- Github ----------
10:44:23 workflow.py:1579 DEBUG    data `token` stored as `cpickle`
10:44:23 workflow.py:1594 DEBUG    stored data loaded: /Users/didier/Library/Application Support/Alfred/Workflow Data/com.matthewmcg.github/token.cpickle
10:44:23 workflow.py:1565 DEBUG    no data stored for `repos`
10:44:23 workflow.py:2074 ERROR    'NoneType' object is not iterable
Traceback (most recent call last):
  File "/Users/didier/.config/Alfred/Alfred.alfredpreferences/workflows/user.workflow.62D47871-8A59-47C4-A9A2-8D4D80117EF6/workflow/workflow.py", line 2067, in run
    func(self)
  File "github.py", line 91, in main
    repos = get_repos(wf, token)
  File "github.py", line 73, in get_repos
    return load_repos(wf, token)
  File "github.py", line 64, in load_repos
    repos = get_all(token)
  File "github.py", line 52, in get_all
    futures = [pool.submit(request,token,url) for url in urls]
TypeError: 'NoneType' object is not iterable
10:44:23 workflow.py:2097 DEBUG    ---------- finished in 0.823s ----------

'NoneType' object is not iterable

image

[10:44:22.993] ERROR: Github[Script Filter] Code 1: .
10:44:22 workflow.py:2057 DEBUG    ---------- Github ----------
10:44:22 workflow.py:1579 DEBUG    data `token` stored as `cpickle`
10:44:22 workflow.py:1594 DEBUG    stored data loaded: /Users/didier/Library/Application Support/Alfred/Workflow Data/com.matthewmcg.github/token.cpickle
10:44:22 workflow.py:1565 DEBUG    no data stored for `repos`
10:44:22 workflow.py:2074 ERROR    'NoneType' object is not iterable
Traceback (most recent call last):
  File "/Users/didier/.config/Alfred/Alfred.alfredpreferences/workflows/user.workflow.62D47871-8A59-47C4-A9A2-8D4D80117EF6/workflow/workflow.py", line 2067, in run
    func(self)
  File "github.py", line 91, in main
    repos = get_repos(wf, token)
  File "github.py", line 73, in get_repos
    return load_repos(wf, token)
  File "github.py", line 64, in load_repos
    repos = get_all(token)
  File "github.py", line 52, in get_all
    futures = [pool.submit(request,token,url) for url in urls]
TypeError: 'NoneType' object is not iterable
10:44:22 workflow.py:2097 DEBUG    ---------- finished in 0.781s ----------
[10:44:23.969] ERROR: Github[Script Filter] Code 1: .
10:44:23 workflow.py:2057 DEBUG    ---------- Github ----------
10:44:23 workflow.py:1579 DEBUG    data `token` stored as `cpickle`
10:44:23 workflow.py:1594 DEBUG    stored data loaded: /Users/didier/Library/Application Support/Alfred/Workflow Data/com.matthewmcg.github/token.cpickle
10:44:23 workflow.py:1565 DEBUG    no data stored for `repos`
10:44:23 workflow.py:2074 ERROR    'NoneType' object is not iterable
Traceback (most recent call last):
  File "/Users/didier/.config/Alfred/Alfred.alfredpreferences/workflows/user.workflow.62D47871-8A59-47C4-A9A2-8D4D80117EF6/workflow/workflow.py", line 2067, in run
    func(self)
  File "github.py", line 91, in main
    repos = get_repos(wf, token)
  File "github.py", line 73, in get_repos
    return load_repos(wf, token)
  File "github.py", line 64, in load_repos
    repos = get_all(token)
  File "github.py", line 52, in get_all
    futures = [pool.submit(request,token,url) for url in urls]
TypeError: 'NoneType' object is not iterable
10:44:23 workflow.py:2097 DEBUG    ---------- finished in 0.823s ----------

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.