octobox/README.md

212 строки
8.0 KiB
Markdown
Исходник Обычный вид История

2016-12-18 23:34:05 +03:00
# Octobox 📮
2016-12-17 02:22:09 +03:00
2016-12-21 20:08:22 +03:00
Take back control of your GitHub Notifications with [Octobox]( https://octobox.io).
2016-12-17 02:26:25 +03:00
2016-12-28 01:52:38 +03:00
![Screenshot of Github Inbox](https://cloud.githubusercontent.com/assets/1060/21510049/16ad341c-cc87-11e6-9a83-86c6be94535f.png)
2016-12-17 02:39:04 +03:00
2016-12-23 15:15:16 +03:00
[![Build Status](https://travis-ci.org/octobox/octobox.svg?branch=master)](https://travis-ci.org/octobox/octobox)
[![Code Climate](https://img.shields.io/codeclimate/github/octobox/octobox.svg?style=flat)](https://codeclimate.com/github/octobox/octobox)
[![Test Coverage](https://img.shields.io/codeclimate/coverage/github/octobox/octobox.svg?style=flat)](https://codeclimate.com/github/octobox/octobox)
2016-12-28 03:17:26 +03:00
[![Code Climate](https://img.shields.io/codeclimate/issues/github/octobox/octobox.svg)](https://codeclimate.com/github/octobox/octobox/issues)
[![license](https://img.shields.io/github/license/octobox/octobox.svg)](https://github.com/octobox/octobox/blob/master/LICENSE.txt)
[![Docker Automated build](https://img.shields.io/docker/automated/octoboxio/octobox.svg)](https://hub.docker.com/r/octoboxio/octobox/)
2016-12-19 23:16:43 +03:00
2016-12-17 04:27:04 +03:00
## Why is this a thing?
2016-12-17 14:49:24 +03:00
If you manage more than one active project on GitHub, you probably find [GitHub Notifications](https://github.com/notifications) pretty lacking.
2016-12-17 03:10:41 +03:00
2016-12-17 14:49:24 +03:00
Notifications are marked as read and disappear from the list as soon as you load the page or view the email of the notification. This makes it very hard to keep on top of which notifications you still need to follow up on.
2016-12-17 03:10:41 +03:00
2016-12-17 14:49:24 +03:00
Most open source maintainers and GitHub staff end up using a complex combination of filters and labels in Gmail to manage their notifications from their inbox. If, like me, you try to avoid email, then you might want something else.
2016-12-17 03:10:41 +03:00
2016-12-18 23:34:05 +03:00
Octobox adds an extra "archived" state to each notification so you can mark it as "done". If new activity happens on the thread/issue/pr, the next time you sync the app the relevant item will be unarchived and moved back into your inbox.
2016-12-17 03:10:41 +03:00
2016-12-17 04:27:04 +03:00
## What state is the project in right now?
You can use [a hosted version](https://octobox.io) right now.
You could also host it yourself, in Heroku or otherwise.
2016-12-17 14:49:24 +03:00
2016-12-23 15:15:16 +03:00
Check out the open issues for a glimpse of the future: https://github.com/octobox/octobox/issues.
2016-12-17 03:10:41 +03:00
## Requirements
Web notifications must be enabled in your GitHub settings for Octobox to work: https://github.com/settings/notifications
<img width="757" alt="Notifications settings screen" src="https://cloud.githubusercontent.com/assets/1060/21509954/3a01794c-cc86-11e6-9bbc-9b33b55f85d1.png">
## Deployment to Heroku
2016-12-18 23:34:05 +03:00
You can host your own instance of Octobox using Heroku. Heroku will ask you to provide a 'personal access token' which you can create on GitHub. When creating it, make sure you enable the notifications scope on it.
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
2016-12-20 18:03:26 +03:00
## Running Octobox for [GitHub Enterprise](https://enterprise.github.com/home)
In order to setup Octobox for your GitHub Enterprise instance all you need you do is add your enterprise domain to the `.env` file / deployed environment.
Example:
```
2016-12-20 19:49:35 +03:00
GITHUB_DOMAIN=https://github.foobar.com
2016-12-20 18:03:26 +03:00
```
And that's it :sparkles:
## Using Personal Access Tokens
Octobox can optionally allow you to set a personal access token to use when querying for notifications. This must be enabled
at the server level. In order to enable it, add the environment variable `PERSONAL_ACCESS_TOKENS_ENABLED` to the `.env` file / deployed environment.
Example:
```bash
PERSONAL_ACCESS_TOKENS_ENABLED=1
```
Once that is set, users can set a personal access token on the Settings page (found on the user drop-down menu).
2016-12-17 02:39:04 +03:00
## Development
2016-12-23 15:15:16 +03:00
The source code is hosted at [GitHub](https://github.com/octobox/octobox).
You can report issues/feature requests on [GitHub Issues](https://github.com/octobox/octobox/issues).
2016-12-17 14:49:24 +03:00
For other updates, follow me on Twitter: [@teabass](https://twitter.com/teabass).
2016-12-17 02:39:04 +03:00
### Getting Started
2016-12-17 14:49:24 +03:00
New to Ruby? No worries! You can follow these instructions to install a local server, or you can use the included [Vagrant](https://www.vagrantup.com/docs/why-vagrant/) setup.
2016-12-17 02:39:04 +03:00
#### Installing a Local Server
First things first, you'll need to install Ruby 2.3.3. I recommend using the excellent [rbenv](https://github.com/rbenv/rbenv),
2016-12-17 14:49:24 +03:00
and [ruby-build](https://github.com/rbenv/ruby-build):
2016-12-17 02:39:04 +03:00
```bash
brew install rbenv ruby-build
rbenv install 2.3.3
rbenv global 2.3.3
```
Next, you'll need to make sure that you have PostgreSQL installed. This can be
done easily on OSX using [Homebrew](http://mxcl.github.io/homebrew/) or by using [http://postgresapp.com](http://postgresapp.com). Please see these [further instructions for installing Postgres via Homebrew](http://www.mikeball.us/blog/setting-up-postgres-with-homebrew/).
```bash
brew install postgres
```
On Debian-based Linux distributions you can use apt-get to install Postgres:
```bash
sudo apt-get install postgresql postgresql-contrib libpq-dev
```
Now, let's install the gems from the `Gemfile` ("Gems" are synonymous with libraries in other
2016-12-17 14:49:24 +03:00
languages):
2016-12-17 02:39:04 +03:00
```bash
gem install bundler && rbenv rehash
bundle install
```
Once all the gems are installed, we'll need to create the databases and
2016-12-17 14:49:24 +03:00
tables. Rails makes this easy through the use of "Rake" tasks:
2016-12-17 02:39:04 +03:00
```bash
2016-12-19 16:21:02 +03:00
bundle exec rake db:create db:migrate
2016-12-17 02:39:04 +03:00
```
2016-12-19 06:03:06 +03:00
Now go and register a new [GitHub OAuth Application](https://github.com/settings/applications/new), your development configuration should look something like this:
<img width="561" alt="screen shot 2016-12-18 at 21 54 35" src="https://cloud.githubusercontent.com/assets/564113/21299762/a7bfaace-c56c-11e6-834c-ff893f79cec3.png">
If you're deploying this to production, just replace `http://localhost:3000` with your applications URL.
Once you've created your application you can then then add the following to your `.env`:
2016-12-17 02:39:04 +03:00
```
2016-12-18 19:26:49 +03:00
GITHUB_CLIENT_ID=yourclientidhere
GITHUB_CLIENT_SECRET=yourclientsecrethere
2016-12-17 02:39:04 +03:00
```
Finally you can boot the rails app:
```bash
rails s
```
#### Docker
2016-12-17 02:39:04 +03:00
You can use Docker to run Octobox in development.
First, [install Docker](https://docs.docker.com/engine/installation/). If you've got run macOS or Windows, Docker for Mac/Windows makes this really easy.
Then, run:
```bash
GITHUB_CLIENT_ID=yourclientid GITHUB_CLIENT_SECRET=yourclientsecret docker-compose up --build
```
2016-12-17 02:39:04 +03:00
Octobox will be running on [http://localhost:3000](http://localhost:3000).
**Note**: You can add `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET` to a `.env` file instead of supplying them directly on the command-line.
2016-12-17 02:39:04 +03:00
2016-12-27 16:17:19 +03:00
### Sync notifications automatically
Now that you've set all to go you can configure the app to sync the notifications automatically, there is a rake task that will do this for every user
```
rake tasks:sync_notifications
```
You will need to configure this to run automatically
#### Heroku
Create a Heroku Scheduler
```
heroku addons:create scheduler:standard
```
Visit the Heroku Scheduler resource and add a new job to run `rake tasks:sync_notifications` daily
#### Cronjob
Run `crontab -e`
Add the following
```
@daily cd octobox_path && /usr/local/bin/rake RAILS_ENV=production tasks:sync_notifications
```
To find the full path for your rake executable, run `which rake`
### Keyboard shortcuts
You can use keyboard shortcuts to navigate and perform certain actions:
- `a` - Select/deselect all
- `r` or `.` - refresh list
- `j` - move down the list
- `k` - move up the list
- `s` - star current notification
- `x` - mark/unmark current notification
- `y` - archive current/marked notification(s)
2016-12-22 07:40:04 +03:00
- `o` or `Enter` - open current notification in a new window
Press `?` for the help menu.
2016-12-17 02:39:04 +03:00
### Note on Patches/Pull Requests
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so we don't break it in a future version unintentionally.
* Send a pull request. Bonus points for topic branches.
### Code of Conduct
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
## Copyright
2017-01-01 12:56:08 +03:00
Copyright (c) 2017 Andrew Nesbitt. See [LICENSE](https://github.com/octobox/octobox/blob/master/LICENSE.txt) for details.