Coder Social home page Coder Social logo

alfred-github-workflow's Introduction

GitHub Workflow for Alfred

You can search through GitHub (gh) and your GitHub Enterprise instance (ghe).

DOWNLOAD

Workflow Screenshot

Setup

This workflow requires PHP, which is no longer pre-installed since macOS 12 Montery.
You can install it via Homebrew (brew install php).

For github.com

In Alfred type (gh > login) to authenticate against your account. The login uses OAuth, so you do not have to enter your credentials.

For github enterprise

  1. In Alfred type (ghe > url https://github.mycompany.com)
  2. Create a new Personal Access Token (ghe > generate token or https://github.mycompany.com/settings/applications). It only needs access to your repos. Copy this token to your clipboard.
  3. In Alfred type (ghe > login <paste token here>)
  4. You can now ghe your_enterprise_repo_name

Access to private repositories in organizations

Organizations must approve this app, otherwise private repositories of that organization can not be accessed. Access can be requested here.

Key Combinations

Key Combination Action
enter Open entry in default browser
cmd + c Copy URL of the entry
cmd + enter Paste URL to front most app
shift or cmd + y Open URL in QuickLook

Commands

To search through your GitHub Enterprise instance replace gh by ghe.

Repo commands

  • gh user/repo
  • gh user/repo #123
  • gh user/repo @branch
  • gh user/repo *commit
  • gh user/repo /path/to/file
  • gh user/repo actions
  • gh user/repo admin
  • gh user/repo clone
  • gh user/repo dev
  • gh user/repo discussions
  • gh user/repo graphs
  • gh user/repo issues
  • gh user/repo milestones
  • gh user/repo network
  • gh user/repo new issue
  • gh user/repo new pull
  • gh user/repo projects
  • gh user/repo pulls
  • gh user/repo pulse
  • gh user/repo releases
  • gh user/repo wiki
  • gh user/repo projects

User commands

  • gh @user
  • gh @user overview
  • gh @user repositories
  • gh @user stars
  • gh @user gists

Search commands

  • gh s repo
  • gh s @user

"My" commands

  • gh my dashboard
  • gh my notifications
  • gh my profile
  • gh my issues
  • gh my issues created
  • gh my issues assigned
  • gh my issues mentioned
  • gh my pulls
  • gh my pulls created
  • gh my pulls assigned
  • gh my pulls mentioned
  • gh my pulls review requested
  • gh my repos
  • gh my repos new
  • gh my settings
  • gh my stars
  • gh my gists

Workflow commands

  • gh > login
  • gh > logout
  • gh > delete cache
  • gh > delete database
  • gh > update
  • gh > activate autoupdate
  • gh > deactivate autoupdate
  • gh > help
  • gh > changelog
  • ghe > url (GitHub Enterprise only)
  • ghe > generate token (GitHub Enterprise only)
  • ghe > enterprise reset (GitHub Enterprise only)

alfred-github-workflow's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alfred-github-workflow's Issues

Show private repos

When using the command bar, I've noticed that it does not include any private repos that I am a part of.

Cache

It would be awesome if while the results load a cache would be displayed, from time to time GH won't be as responsive as I would like it to be.

Can't login with 2-factor authentication enabled

When trying to gh > login > , the prompt for the password showed up, and I entered my password. It sent me my 2 factor authentication token, but I'm not sure where to input that and I received a notification that Login Failed.

Allow configure for GH:E

Would be nice if you could configure for a different server so that it could be used with github enterprise

Search for issues by full text search

First of all, thanks for this awesome workflow !

It would be cool if one could directly search for issues from within Alfred, e.g. gh user/project # and then part of an issue text. So, the same functionality as the autocomplete popup when you are editing an issue and type #.

I don't know whether this is feasible via the GitHub API, but for me it would be awesome because when writing mails or documentation, a quick lookup for an issue's URL and inserting it into the text would save quite some clicks.

Repository is not being found on refresh

I created a Private repo; refreshed the local cache several times as well.

No matter what I do (even put in the full repo name) the repo does not appear in my list of results. Any thoughts on why this may be happening? Thanks so much!

Add a help command

This is a really useful workflow, but my initial attempts to use it were slightly confusing. A gh help command that either shows possible commands in the quick-list or opens up the readme would be super useful.

Only ever says "loading results"

Alfred Version: 2.6(374)
OS: Yosemite 10.10.2
Workflow version: fresh download from README

No matter what I type all I see is "loading results...":
loading

This workflow is great and was working for me last week. I have no idea what changed. Am I doing it wrong?

Update failed

After trying to apply the auto update I get this error message:
image

I'm guessing that I can just uninstall and reinstall and it should be good but before I do I thought that you might want me to help debug the issue.

GitHub `t` shortcut like behaviour?

If you go to a GitHub repo and type t, you'll enter a find section which is great for looking up files. Is it possible to have a similar thing directly from your GitHub alfred commands? It'd be really useful :)

Allow GH Enterprise/non-github.com hosts

We're using an internal GH and I'd love to be able to use this workflow against it.

Was unable to hack my way around and get it to work; pointers to where to look would be more than adequate.

Feature Request: Add Issue to Repo

I would love a feature that allowed me to send new issues to a github repo I manage by simply typing gh name/repo issues "Submit button doesn't work" ... is this possible?

Most recent update

Is awesome!! Thanks. ❤️

ps: The update failed on my machine but I just deleted and reinstalled and it is awesome again.

org. repos missing from alfred completion list; slash changes behavior

some of the repos that previously appeared in the alfred github list are now missing.

it's hard to diagnose why some appear and some don't: it's not simply the private ones (since many private repos for our organization do appear).

the behavior also changes depending on whether or not i type the slash after the organization name; witness:`

no trailing slash:
no slash

add trailing slash, results change, desired repo disappears
slash

type name of repo, repo now completely missing:
explicitly

Feature Request: gh my gists

Would love it if this workflow supported a "my" command that brought you to the users gists page at https://gist.github.com/<username>/

Thanks so much for this workflow I use it every hour of everyday

Doesn't work with 2-factor authentication

I have 2-factor authentication enabled on my GitHub account, so I need to use a token instead of my password to sign in with 3rd party apps, but the workflow isn't letting me do this.

When I run gh > login username (with my username) it opens the window to enter my password. Each of these three scenarios fails to login and just alerts "Login failed":

  • Pasting in the token
  • Manually typing the token
  • Entering my GitHub account password

Recently stopped working

This workflow has recently stopped working for me. Turning on debug in Alfred shows the following after entering 'gh ' in Alfred:

Starting debug for 'GitHub commands'

[ERROR: alfred.workflow.input.scriptfilter] XML Parse Error 'The operation couldn’t be completed. (NSXMLParserErrorDomain error 4.)'. Row (null), Col (null): 'Document is empty' in XML:
Warning: Invalid argument supplied for foreach() in /Users/chrisr/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6BFDEAD2-8BDD-4CFA-A750-E7C344C74653/search.php on line 173

Warning: Invalid argument supplied for foreach() in /Users/chrisr/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6BFDEAD2-8BDD-4CFA-A750-E7C344C74653/search.php on line 206
<?xml version="1.0"?>
<items><item uid="56dfe8cbd30155d0d328f3d777767991" autocomplete=" my " valid="no"><icon>icon.png</icon><title>my &#x2026;</title><subtitle>Dashboard, settings, and more</subtitle></item></items>

Unable to access private repos in organization

I've logged in using gh > login <user>, but am unable to access private repos to a Github organization I belong to? I know others who belong to the same org and am able to access the private repos. Am I missing something silly?

Cannot log in

When I attempt to log in to my github account with the workflow, it continues saying "Loading results...," and never responds.

Screen Shot 2013-04-05 at 12 28 14 PM

One note on my system in case it's of interest:

> which php                                                                                                                                                                                                                                   (product-data-handling+) 12:26:01
/Users/jcamenisch/.phpbrew/php/php-5.3.20/bin/php

Permissions: Write Access

When asked to authenticate, it seems this workflow requires access to "write" to repositories.

github-permissions

1. What is the "write" permission used for? 2. Is it possible to use this workflow by _only_ approving "read" permissions? 3. Do you have any plans to allow approving _only_ "read" permissions?

Thanks!

Autoupdate fails

I get an "Update failed" message whenever trying to run gh > update. I have to remove it and reinstall in order to get the latest version.

Lastest Update Broke me

The prior fix had the plugin working. I was just prompted to update and now i'm busted.

mavericks PHP 5.4.24

Unable to paste password

I use 1password to manage my passwords. My github password is long and would be arduous to type. I can't paste it from the clipboard currently.

I can't login using `gh > login`

I've been using this workflow for the past few months or so and suddenly it has stopped working. I removed the previous installation and downloaded the new one. I can't login. Help?

image

Cannot log in

I just get a "Login failed" notification when attempting to log in. The dialog box for the password never appears. Running on OS 10.7.5.

not loading results

Thank you for this workflow. It is great and I use it all of the time.
Lately it will not bring back results. It used to bring back repos connected to me somehow, and repos I starred, but for the last week whenever I type in a query it just lets me search for it on github instead of bringing back results.

I have not changed anything in the workflow.

Is there something I can try to debug the problem?

Feature: view your pulls

It’d be sweet to see a list of my open pulls, most recent on top, so I can jump quickly to a pull.

gh my pulls seems like a natural place, but it already has another behavior.

@gharlan What do you think? I can take a stab at it, if you like it.

osascript: can't open default scripting component on OS X 10.11

This workflow used to work great for me, now I am getting this error message when I debug it. The workflow has not worked since updating to 10.11.

[INFO: alfred.workflow.input.scriptfilter] Processing output 'alfred.workflow.action.script' with arg 'https://github.com/REDACTED/REDACTED'
[ERROR: alfred.workflow.action.script] osascript: can't open default scripting component.
[INFO: alfred.workflow.action.script] Processing output 'alfred.workflow.output.notification' with arg ''

Any thoughts?

Doesn't support private repos

They're neither autocompleted, nor detected as repos when typed out manually (it instead sends a search query)

Since the user is made to login anyway, why not also index their (and their organizations') private repos? For people who use GitHub at work, this is absolutely vital!

Not able to login/use

Since upgrading I haven't been able to actually use the workflow. Am I doing something wrong/missing something?

Behavior:

gh_alfred_error

Broken since last update

Today it prompted me an update was available which successfully installed. But although it tells me Iogin succeeds and the cookie file is created, I can't seem to get passed login. gh > login <user> is the only command available.

I've uninstalled and installed the workflow again. Removed the workflow data folder. Tried to run the script through the terminal instead and got the same result.

Any ideas?

Thank you!

(It was working fine before the update)

Show blob not working for private repo

I can view blobs in public repos, but when I type a slash (to view blobs) in a private repo, no entries appear in the list. Is there any other information I can provide to help debug?

Can't login

It seems that this is broken since the recent 2.3 update to Alfred. Is it just me?

When I try to log in, the login popup never pops up for me.

[

It'd be great if the "new pull" could autocomplete the branch from which to do the new pull request.

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.