pacmax beta

Alfred Pac by gharlan on GitHub

Alfred Github Workflow

GitHub Workflow for Alfred

From their README

GitHub Workflow for Alfred

You can search through GitHub (gh) and your GitHub Enterprise Cloud/self-hosted 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 Cloud

  1. In Alfred type ghe > url https://github.com/enterprises/.
  2. Create a new Personal Access Token (ghe > generate token or https://github.com/settings/tokens). It only needs access to your repos. If your enterprise enforces SAML SSO, make sure to authorize the token for the relevant organizations.
  3. In Alfred type (ghe > login )
  4. You can now use ghe your_enterprise_repo_name

For GitHub Enterprise Server (self-hosted)

  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 )
  4. You can now use 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)

Latest release

  • 1.106 months ago, 155 KBDownload

    Features

    • Support for GitHub Enterprise Cloud (#147)
    • Better search ranking for partial matches inside results (#152)
    • Faster and lighter on memory for repos with lots of commits, issues or branches (#159)
    • Requires PHP 8.2 or newer

    Bugfixes

    • No more recurring crashes that previously required deleting the workflow data directory (#82)
    • Fewer "database is locked" errors when typing fast (#82)
    • Escape ANSI escape codes in item titles (#160)
    • Fix occasional crash when reading paginated cached data (#156)
16 earlier releases
  • 1.9.28 months ago, 151 KBDownload

    Bugfix

    • Fix for PHP 8.5 (deprecated curl_close)
  • 1.9.11 year ago, 151 KBDownload

    Bugfix

    • Fix for PHP 8.4 (@romantech)
    • Fix for branch names containing special chars like #
  • 1.92 years ago, 151 KBDownload

    Features

    • Better support for Alfred 5
    • gh my stars opens /<username>?tab=stars instead of /stars
  • 1.8.14 years ago, 151 KBDownload

    Bugfix

    • Fixed version number in workflow
  • 1.84 years ago, 151 KBDownload

    Features

    • New command gh user/repo dev opening repo in Visual Studio Code (Codespaces)
    • New command gh user/repo discussions
    • New command gh my repos new
    • Search issues by title (gh user/repo #search)
    • Archived repos with prefix [Archived] in subtitle
    • Performance improvement

    Bugfixes

    • Fix result display for non-PR issue IDs (@tobias-grasse)
    • Fix git clone url, use new x-github-client:// scheme
  • 1.7.14 years ago, 132 KBDownload

    Bugfixes

    • Fix deprecation warning when using PHP 8.1
  • 1.75 years ago, 132 KBDownload

    Features

    • Support for macOS 12 Montery: PHP is no longer pre-installed, you must install it by yourself via Homebrew (brew install php)
    • Better support for Alfred 4
    • new command gh user/repo actions (@Attsun1031)
    • command gh user/repo new issue lands on issue template selector page (@riastrad)
  • 1.6.28 years ago, 132 KBDownload

    Bugfixes

    • Api pagination didn't work correctly any more (missing results from page > 2)
  • 1.6.19 years ago, 132 KBDownload

    Bugfixes

    • Support for macOS 10.13 High Sierra
    • Commit search results had wrong urls on GitHub Enterprise (@beparker)
  • 1.69 years ago, 132 KBDownload

    Features

    • new command gh user/repo projects (@dagio)
    • new command gh my pulls review requested (@AeroEchelon)
    • better sorting for issues (most recently updated on top) and commits (most recent on top) (@danielma)

    Bugfixes

    • On macOS 10.12.5 Beta URLs didn't opened in browser anymore
  • 1.59 years ago, 141 KBDownload

    Features

    • new commands for searching repos and users globally in GitHub (gh s repo and gh s @user)
    • new command gh my repos (@jacobkossman)
    • new command gh > delete database
    • source repos with higher priority than forks

    Bugfixes

    • in some situations private repos were missing (@lxynox)
    • after saving GitHub Enterprise url the workflow didn't reopen correctly
    • updated user sub commands ("Activity" tab does not exist any more on GitHub)
  • 1.4.110 years ago, 147 KBDownload
    • fixed reading environment variables (important for hotkey support)
  • 1.410 years ago, 147 KBDownload
    • Hotkey support
    • use native update mechanism of Alfred (to keep your hotkeys)
    • new command gh user/repo releases (@altern8tif)
    • cache warmup after login
    • lower cpu usage in multi curl
    • fixed autocomplete values in GitHub Enterprise
  • 1.310 years ago, 142 KBDownload

    Important: This is the last version for Alfred 2.

    • Disabled updates in Alfred 2
    • Updates in Alfred 3 are loaded from new location (GitHub releases)
  • 1.210 years ago, 142 KBDownload

    Features

    • New sub commands for gh my issues/pull: created, assigned and mentioned
    • New help command: gh > help
    • Longer cache lifetime
  • 1.110 years ago, 142 KBDownload

    Features

    • GitHub Enterprise support (use ghe)
    • Commit search (gh user/repo *hash)

    Bugfixes

    • A space after gh is required to avoid confusion when using commands of other workflows like ghost