Gitea Alfred Workflow
MIT License
tea set token <token>
or tea set key <token>
(both do the same)tea set url <url>
.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.
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:
The workflow learns from usage and will sort the returned results by this criteria.
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.
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.
x-next-page
and x-page
headers, therefore the total number of pages needs to be calculated on the fly in every runWhat 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.