* Seperate api namespace and notifications controller
Closes#2849
* test clean up
* Avoid loading counts in api/notifications#index
* force per_page to ignore cookies in api/notifications
* Update documentation
* there shouldn't be a zeroth page
* move docs to api controllers
* users api controller
* reduce duplicate api templates
* use assert_nil
* pinned searches api controller and docs
* Extract notification json builder into partial
* Add to_api_url method to Octobox::SubjectUrlParser
* Add lookup endpoint to find notifications by html url
* move users edit titles to i18n
* second pass
* alphabetize
* complete pinned searchs
* wrap up themes section
* finish api token
* update manage oauth buttons
* finish moving strings to local from statistics section
* moving another couple of sections
* add i18n for final section
This is to allow an octobox setup in an reverse proxy setup and to pass
the hostname check as described in https://www.fngtps.com/2019/rails6-blocked-host/
Also, adapted the OpenShift templates to use ALLOW_ALL_HOSTNAMES as
octobox is shielded by the OpenShift router anyway and does not require
this hostname check.
Fixes#2011.
* Allow custom port to be set for postgres OCTOBOX_DATABASE_PASSWORD. Fixes#1891
* fixed typo from copy / paste
* fixed typo from copy / paste
* fixed env int / string
If $DYNO_RAM is set, us that, otherwise use the cgroup memory
controller's limit info to calculate the RAM limit. Failing either of
those return the default of 512.
This works in Heroku's Dyno containers and may/probably works in other
containers that mount in the containers cgroup controler.
* Add comment counts to notifications
* Move breakpoint for xxxl to match 15in macbook pro
* Add a a bit of spacing to bottm of the thread
* move comments to partial
* add expand comments button, js, route and controller
* Remove negative comments to load button
* render whole page or partial depending on request type
* remove commented code
* clean up
* * add button styles again
* link button on thread to original issue
+ make avatars smaller
* add timeline thread
* add issue number to threads
* add comment count to threads
* speed up bootsrtrap collapse transitions
remove extra border on collapsed cards
* Add notification reason back in
* middle dot
* Dont hide comment counts on reposive layout
* Alternative (preferred) header layout
* fix header for last comment
* rubcop fix
* fix rubcop bugs
* Fix alignment of comments and labels
* fix pluralize
* bit more space for text after status
* add some (broken) tests
* put the factory in the right place :)
* Add basic comment form, route and controller
* Add comment worker to handle initial comment post
* save comment to db
post comment to gh
sync the comment in the db
* fix comments worker > comment_on_github
/gif it's WORKING
* add simple test
* rescue CommentWorker from recoverable GH errors
add CommentWork tests
add (broken) NotificationsController test
* Redirect user to notification_path if posting a comment
Add test for new comment created on reicieving a comment
* escape keypresses for the comment box
* Render a comment template if we recieve the request from js
* Fix spec
* Do not render comments if we already have it on the thread
* add view on GH button
* Review changes
* Save a sql qry
* DRY up adding a comment
* DRY enough yet?
* Final review check
* * checkpoint to sense check with dat teabass
* Hopefully committing a new conditional... Comment all the things!
* * test whether our can_comment? method is working (TDD FTW)
* fix typos in user.can_comment?
fix personal access token test
* Update app/controllers/notifications_controller.rb
whitebait
Co-Authored-By: BenJam <BenJam@users.noreply.github.com>
* bracket safely!
* review fixes
* fix commentable :|
* actually check whether we have an app_token
* refactor huge logic conditional
* Add requested tests
* Fixed up can_comment? tests
* Fixed rubocop warnings
* Fixed more tests
* use appropriate app token to post comment to github
* More test fixes
* ensure that read issues incldues write permission too
* modify error message
* remove race condition on thread-view clicks in JS
* Add tests for correct key used when posting a comment
* aaand now the test is broken again.
* fix test
* Fix posting to pull requests
* remove dem puts!
* submit comment form on CMD+enter
space buttons in form
* Update docs
* Synchronous open collective donation journey
* Fix api key parameter name in OC api call
* Add some tests
* Only upgrade user's who've donated at least $10
* Fix tests on travis
Actioncable logging is very noisy, even at info level and is filling up
our papertrail account on a daily basis for https://octobox.io at the
moment, so going to disable it for now.
* Add comment counts to notifications
* Move breakpoint for xxxl to match 15in macbook pro
* Add a a bit of spacing to bottm of the thread
* move comments to partial
* add expand comments button, js, route and controller
* Remove negative comments to load button
* render whole page or partial depending on request type
* remove commented code
* clean up
* * add button styles again
* link button on thread to original issue
+ make avatars smaller
* add timeline thread
* add issue number to threads
* add comment count to threads
* speed up bootsrtrap collapse transitions
remove extra border on collapsed cards
* Add notification reason back in
* middle dot
* Dont hide comment counts on reposive layout
* Alternative (preferred) header layout
* fix header for last comment
* rubcop fix
* fix rubcop bugs
* Fix alignment of comments and labels
* fix pluralize
* bit more space for text after status
* add some (broken) tests
* put the factory in the right place :)
* Perform initial sync of subjects using an installation token
Fixes#1125
There was an interesting race condition where the GitHub App was
installed on a repository and the background job fired before any users
had authorized the GitHub App oauth.
This meant there wasn't an app_token to download the subjects for
existing notifications.
Instead we kick off a sync of all possible subjects for a repository
using an installation token which doesn't require any users to have
authorized the GitHub App
* Fix tests
* Sync comments for issues and pull requests
Extracted as part of #709
Currently opt-in behind a ENV var
* Mostly working thread-view revisited
* * set three col layout
* remove dodgey comment previews
* simplify layout
* * add new bnreakpoints for larger screens only
* * add notification-type buttons
* add tooltips to next/previous buttons
* * remplement star ticking
* * reimplement archive/unarchive sleected
* add archive/unarchiveThread
* * add mute button
* * add PR status
* move issue status
* fix comment last_read_at check
* * fix typo on empty thread
* fix position of empty thread notie
* * move responsive design up a breakpoint
* * fix up breakpoints
* refactor layout SCSS to reuse responsive elements
* * add :display_comments to user records
* * make only links that are subjectable? click through in Octobox
* * add filtered params to links
* * do not display main notifications window on smaller devices when a thread is open
* * add delete and mute buttons to threads
* * add review tweaks
* Move viewThread click logic to octobox.js
* For notifications with no subject, avoid opening in threadview
Also makes threadview partial resilant to missing subjects, just incase
* * add external link octicon if opening notifications in a new window
* * add error flash message for viewThread
* * add notice about comment threads views
* * remove flash notice
* add card ribbon classes
* add beta notice to setting
* Promote the GitHub app on Octobox.io
* Add popover prompt for notifications without the app installation
* * make navbar dropdown more consistent with defautl btns
* tone down the 'install GH app button'
* Private repo support coming soon
* Only show prompt on subjectable notifications
* Swap app_install_url for app_url
* add fill state for appm install button
//todo add fill states or all svg fills on twbs...
* oops, forgot to add the svg text class
* Add (incomplete) pricing page
* add pricing page
* amend non-homepage header logoc
* add nicer logo for /privacy and /terms
* Explainer on /pricing page
* add details to /pricing page re open collective and octobox ltd.
* add .readable class for anyhting that is long-form text
* randomise appearance of pricing boxes to reduce risk of anchoring
* make terms and privacy .readable
* * add rake tasks to sync opencollective supporters
* Change coming soon wording
* Use time.current not time.now in logs
* remove extraneous comments
* Swap marketplace_url for octobox_io in billing checks
* Update links on pricing page
* Remove $light variable
* Remove invalid css
* Update pricing prompt text
* Copy updates
* added Bullet gem to detect N+1 queries and unused eager loading
* added some more gems for DEV environment
* Moved better_error gems to DEV Group to prevent them Catching the errors