Skip to content

:octocat: Alfred workflow to search GitHub repositories

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

rossmacarthur/github.alfredworkflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github.alfredworkflow

Build Status Latest release

:octocat: Alfred workflow to search GitHub repositories and pull requests.

Features

  • Configurable commands.
  • List repositories for any configured users and/or organizations.
    • Open the selected repository in your browser.
  • List pull requests for any configured repositories.
    • Open the selected pull request in your browser.
  • Blazingly fast 🤸.

📦 Installation

Pre-packaged

Grab the latest release from the releases page.

Because the release contains an executable binary later versions of macOS will mark it as untrusted and Alfred won't be able to execute it. You can run the following to explicitly trust the release before installing to Alfred.

xattr -c ~/Downloads/github-*-apple-darwin.alfredworkflow

Building from source

This workflow is written in Rust, so to install it from source you will first need to install Rust and Cargo using rustup. Then install powerpack. Then you can run the following to build an .alfredworkflow file.

git clone https://github.com/rossmacarthur/github.alfredworkflow.git
cd github.alfredworkflow
powerpack package

The release will be available at target/workflow/github.alfredworkflow.

Configuration

Behaviour of the workflow is configured using environment variables. At the top level there are "commands" which can be arbitrarily named. A command takes one of the following forms where <cmd> is the user defined name for the command.

Key Value Description
GITHUB_REPOS_<cmd> org:<owner> List organization repositories
GITHUB_REPOS_<cmd> user:<owner> List user repositories
GITHUB_PULLS_<cmd> <owner>/<repo> List repository pull requests

Authentication for the workflow is configured using environment variables. For any given command if there is an access token specific for that owner then it will be used, otherwise the workflow will fallback to the default access token. The default access token should always be set even if the command doesn't require special access levels because of the increased rate limits provided.

Name Example Description
GITHUB_TOKEN ghp_pv7K2GA... GitHub [personal access token] to use
GITHUB_TOKEN_owner1 ghp_11aEcRG.. GitHub [personal access token] used to access owner1
GITHUB_TOKEN_owner2 ghp_11aEcRG.. GitHub [personal access token] used to access owner2

Examples

Let's say you wanted to have two commands:

  • repos that listed all the repositories in the rust-lang organization
  • pulls that listed all the pull requests in the rust-lang/rust repository

You would define the following environment variables.

Key Value Description
GITHUB_TOKEN ghp_pv7K2GA... GitHub [personal access token]
GITHUB_REPOS_repos org:rust-lang List the repositories on organization rust-lang
GITHUB_PULLS_pulls rust-lang/rust List the pull requests on repository rust-lang/rust
image image image

License

This project is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.

About

:octocat: Alfred workflow to search GitHub repositories

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Languages