Skip to content

Latest commit

 

History

History
executable file
·
77 lines (54 loc) · 3.12 KB

README.md

File metadata and controls

executable file
·
77 lines (54 loc) · 3.12 KB

alfred-gitea

Installation

  1. Set your Gitea Access Token via tea set token <token> or tea set key <token> (both do the same)
  2. Set your Gitea URL via tea set url <url>. The workflow also works without access token but will be restricted to public repos.

The workflow makes calls to the /users/repos endpoint and will only list repos which are accessible via the given access token.

Python3 and macOS > 12.3

macOS 12.3 does not ship with a Python2 interpreter anymore, hence alfred-gitea versions < 2.0.0 will not work. Please update to alfred-gitea >= 2.0.0.

Usage

tea <query> shows all repos using the repos slug owner/repo The next menu let's you make a selection which subpart of the repo to open:

  • Code (repo home)
  • Issues
  • Pull Requests
  • Releases
  • Wiki
  • Projects
  • Settings

The workflow learns from usage and will sort the returned results by this criteria.

Quick Open

If you hold the ⌥ (option) key and then hit ⏎ (return), the subfolder selection will be skipped and the repository will be opened directly. This behavior can also be set as the default by setting variable quick_open to true in the Alfred workflow options. Note however that this will not allow selecting a specific location (repo, settings, etc.) anymore.

alfred-gitea-gif

Starting fresh

If you want to reset the learned behavior or switch to a new Gitea instance, call tea reset. This will delete the cache, access token and the URL.

If you only want to delete the repo cache, call tea clearcache. This will keep the URL and API key set and only invalidate the repo cache.

Acknowledgment

Misc

What about repo avatars?

There is in fact a working solution for repo avatars. However it requires the download of all avatars on each run and a subsequent thumbnail conversion. This adds a delay of at least two seconds until the first match appears in Alfred. Hence I decided to use fixed repo icons.