|
1 | | -## Install |
| 1 | +# Github Repos workflow for Alfred |
2 | 2 |
|
3 | | -Download from [packal](http://www.packal.org/workflow/github-repos-0) to keep it up to date. |
4 | | - |
5 | | -You can also check the [releases history](https://github.com/edgarjs/alfred-github-repos/releases). |
6 | | - |
7 | | ---- |
| 3 | +This is a custom workflow for the [Alfred app][alfred-app] that lets you search and open a Github repository via the Github Search API. |
8 | 4 |
|
9 | 5 | ## Authentication |
10 | 6 |
|
11 | | -1. Call `gh-token` to generate personal access token. |
12 | | -2. Login by calling the `gh-login <email> <token>` action. |
| 7 | +You'll need to authenticate with a personal access token that you can generate in the [Github developer settings page][personal-access-token] or by running the `gh-token` command in Alfred. |
| 8 | + |
| 9 | +After you have copied your personal access token, run `gh-login <your-token>` to set your personal access token. |
13 | 10 |
|
14 | 11 | ## Usage |
15 | 12 |
|
16 | | -1. Search your repositories by calling the `gh <term>` action. |
17 | | -2. Search all repositories by calling the `gha <term>` action. |
18 | | -3. Your repositories are cached. To force re-download cache use `gh-reset-cache` action or choose corresponding item in the `gh <term>` action. |
| 13 | +Here's the list of available commands. |
| 14 | + |
| 15 | +### Global Search: `gh <query>` |
| 16 | + |
| 17 | +The example above will search for repositories with the string "hello-world" in their name. Internally this uses the [Github Search syntax][github-search], so you can use modifiers like: |
| 18 | + |
| 19 | + gh hello-world stars:>100 |
| 20 | + |
| 21 | +This will search only in repositories that have more than 100 stars. |
| 22 | + |
| 23 | +> Please note that this command only searches in the repository name. This means that your query will be appended with the `in:name` modifier. So when you type in `hello-world`, the final search query sent will be: "hello-world in:name". |
| 24 | +
|
| 25 | +### Search your repositories: `repo [query]` |
| 26 | + |
| 27 | +This command works the same as the previous one (`gh <query>`) but it limits the search to your own repositories. |
19 | 28 |
|
20 | | -### Other Actions |
| 29 | +> This includes repositories from your organizations as well. |
21 | 30 |
|
22 | | -* `gh-notifications` will open your Github notifications page. |
| 31 | +### Search Pull Requests: `pr [query]` |
| 32 | + |
| 33 | +This command searches within the Pull Requests that you're involved in. |
| 34 | + |
| 35 | +### Open notifications: `gh-notifications` |
| 36 | + |
| 37 | +This command just opens your [Github notification][notifications-page] page. |
| 38 | + |
| 39 | +## Configuring host for Enterprise |
| 40 | + |
| 41 | +If you're using an Enterprise account, you can call the `gh-host <host>` command. |
23 | 42 |
|
24 | 43 | --- |
25 | 44 |
|
26 | | -### Enterprise Support |
| 45 | +## Contributing |
| 46 | + |
| 47 | +You can submit your bug reports or feature requests at: |
| 48 | +https://github.com/edgarjs/alfred-github-repos/issues |
| 49 | + |
| 50 | +If you want to submit a Pull Request, please follow these simple guides: |
| 51 | + |
| 52 | +1. Add a detailed description of what you're changing and why. |
| 53 | +2. Add necessary unit tests that cover your changes. |
| 54 | +3. Don't increase the version of the workflow in your changes. |
| 55 | + |
| 56 | +Here are some ideas for Pull Requests: |
| 57 | + |
| 58 | +- [ ] Make search faster |
| 59 | +- [ ] Search commits in a repository |
| 60 | +- [ ] Search projects in an organization |
| 61 | +- [ ] Improve icon graphics |
27 | 62 |
|
28 | | -If you're using an enterprise account, set your enterprise host with `gh-host <host>`. |
| 63 | +## License |
29 | 64 |
|
30 | | -The host value should be something like `https://example.com` |
| 65 | +This project is published under the [MIT License](LICENSE.md). |
31 | 66 |
|
32 | | -NOTE: This is an experimental feature that may not work as expected, if you find any issues please report them here: https://github.com/edgarjs/alfred-github-repos/issues |
| 67 | +[alfred-app]: https://www.alfredapp.com/ |
| 68 | +[github-search]: https://docs.github.com/en/free-pro-team@latest/github/searching-for-information-on-github/searching-on-github |
| 69 | +[download-packal]: https://www.packal.org/workflow/github-repos |
| 70 | +[download-releases]: https://github.com/edgarjs/alfred-github-repos/releases |
| 71 | +[personal-access-token]: https://github.com/settings/tokens/new?description=Github%20Repos%20Alfred%20workflow&scopes=repo |
| 72 | +[pulls-page]: https://github.com/pulls |
| 73 | +[notifications-page]: https://github.com/notifications |
| 74 | +[alfred-env-vars]: https://www.alfredapp.com/help/workflows/script-environment-variables/ |
0 commit comments