Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: BadChoice/handesk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.3.3
Choose a base ref
...
head repository: BadChoice/handesk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dev
Choose a head ref

Commits on Oct 11, 2017

  1. Fixes #75 Delete agents

    BadChoice committed Oct 11, 2017
    Copy the full SHA
    4240016 View commit details
  2. Copy the full SHA
    8364fcb View commit details
  3. Apply fixes from StyleCI

    BadChoice authored and StyleCIBot committed Oct 11, 2017
    Copy the full SHA
    abc96ea View commit details
  4. Merge pull request #77 from BadChoice/analysis-8Qj32O

    Apply fixes from StyleCI
    BadChoice authored Oct 11, 2017
    Copy the full SHA
    918cb5f View commit details

Commits on Oct 12, 2017

  1. added a test

    BadChoice committed Oct 12, 2017
    Copy the full SHA
    a3d46cd View commit details
  2. Copy the full SHA
    90f8d52 View commit details

Commits on Oct 16, 2017

  1. Copy the full SHA
    9001b0e View commit details
  2. Merge pull request #80 from BadChoice/bugfix/searchWhenNotAdminFixed

    when not admin search not working properly
    BadChoice authored Oct 16, 2017
    Copy the full SHA
    fa4ad55 View commit details
  3. Apply fixes from StyleCI

    BadChoice authored and StyleCIBot committed Oct 16, 2017
    Copy the full SHA
    4441538 View commit details
  4. Merge pull request #81 from BadChoice/analysis-8bELeM

    Apply fixes from StyleCI
    BadChoice authored Oct 16, 2017
    Copy the full SHA
    076a427 View commit details

Commits on Oct 30, 2017

  1. Copy the full SHA
    4977f84 View commit details

Commits on Oct 31, 2017

  1. bitbucket webhook should work

    Jordi Puigdellívol committed Oct 31, 2017
    Copy the full SHA
    214e546 View commit details
  2. Ticket updating working

    Jordi Puigdellívol committed Oct 31, 2017
    Copy the full SHA
    b280771 View commit details
  3. updated readme with bitbucket webhook

    Jordi Puigdellívol committed Oct 31, 2017
    Copy the full SHA
    387e743 View commit details
  4. Apply fixes from StyleCI

    BadChoice authored and StyleCIBot committed Oct 31, 2017
    Copy the full SHA
    6f0e4d1 View commit details
  5. Merge pull request #84 from BadChoice/analysis-Xp5PKR

    Apply fixes from StyleCI
    BadChoice authored Oct 31, 2017
    Copy the full SHA
    bd1d43c View commit details

Commits on Nov 2, 2017

  1. first ideas commit

    BadChoice committed Nov 2, 2017
    Copy the full SHA
    8e33e33 View commit details
  2. Apply fixes from StyleCI

    BadChoice authored and StyleCIBot committed Nov 2, 2017
    Copy the full SHA
    997a9e6 View commit details
  3. Merge pull request #85 from BadChoice/analysis-zDlRgL

    Apply fixes from StyleCI
    BadChoice authored Nov 2, 2017
    Copy the full SHA
    d3a795c View commit details
  4. Copy the full SHA
    feb9479 View commit details
  5. can create ideas

    BadChoice committed Nov 2, 2017
    Copy the full SHA
    42184a4 View commit details
  6. printing right repo

    BadChoice committed Nov 2, 2017
    Copy the full SHA
    0becaab View commit details

Commits on Nov 3, 2017

  1. More ideas work

    Jordi Puigdellívol committed Nov 3, 2017
    Copy the full SHA
    8875972 View commit details
  2. Apply fixes from StyleCI

    BadChoice authored and StyleCIBot committed Nov 3, 2017
    Copy the full SHA
    5f6c79c View commit details
  3. Merge pull request #86 from BadChoice/analysis-8w5mRo

    Apply fixes from StyleCI
    BadChoice authored Nov 3, 2017
    Copy the full SHA
    3d9ba7d View commit details
  4. can create issues from ideas

    Jordi Puigdellívol committed Nov 3, 2017
    Copy the full SHA
    49dd0ff View commit details
  5. adding ideas issue creation

    Jordi Puigdellívol committed Nov 3, 2017
    Copy the full SHA
    ec5b934 View commit details
  6. adding ideas issue creation

    Jordi Puigdellívol committed Nov 3, 2017
    Copy the full SHA
    61e8212 View commit details
  7. added intouch repositories

    Jordi Puigdellívol committed Nov 3, 2017
    Copy the full SHA
    36966d2 View commit details
  8. Apply fixes from StyleCI

    BadChoice authored and StyleCIBot committed Nov 3, 2017
    Copy the full SHA
    7fc767c View commit details
  9. Merge pull request #87 from BadChoice/analysis-8jMAo9

    Apply fixes from StyleCI
    BadChoice authored Nov 3, 2017
    Copy the full SHA
    30fee17 View commit details
  10. test fix

    Jordi Puigdellívol committed Nov 3, 2017
    Copy the full SHA
    07fc84f View commit details
  11. Merge branch 'feature/ideas' of https://github.com/BadChoice/handesk

    …into feature/ideas
    
    # Conflicts:
    #	app/Idea.php
    Jordi Puigdellívol committed Nov 3, 2017
    Copy the full SHA
    8ea800e View commit details
  12. ticket language detection

    Jordi Puigdellívol committed Nov 3, 2017
    Copy the full SHA
    672a6ef View commit details

Commits on Nov 5, 2017

  1. Copy the full SHA
    1be1f15 View commit details
  2. Apply fixes from StyleCI

    BadChoice authored and StyleCIBot committed Nov 5, 2017
    Copy the full SHA
    835d2a7 View commit details
  3. Merge pull request #89 from BadChoice/analysis-XVgeJD

    Apply fixes from StyleCI
    BadChoice authored Nov 5, 2017
    Copy the full SHA
    c0cdee3 View commit details

Commits on Nov 6, 2017

  1. · edit ideas

    · starting with roadmap
    Jordi Puigdellívol committed Nov 6, 2017
    Copy the full SHA
    8834d09 View commit details
  2. added missing roadmap controller

    Jordi Puigdellívol committed Nov 6, 2017
    Copy the full SHA
    8bfa84b View commit details
  3. Fixed test

    Jordi Puigdellívol committed Nov 6, 2017
    Copy the full SHA
    dd27bda View commit details
  4. added handesk config to disable leads and ideas

    Jordi Puigdellívol committed Nov 6, 2017
    Copy the full SHA
    08b7cef View commit details
  5. Apply fixes from StyleCI

    BadChoice authored and StyleCIBot committed Nov 6, 2017
    Copy the full SHA
    72212ec View commit details
  6. Merge pull request #90 from BadChoice/analysis-zYgnQd

    Apply fixes from StyleCI
    BadChoice authored Nov 6, 2017
    Copy the full SHA
    02e29e8 View commit details
  7. Merge branch 'feature/ideas' into dev

    Jordi Puigdellívol committed Nov 6, 2017
    Copy the full SHA
    03d7947 View commit details
  8. improving new idea mail

    Jordi Puigdellívol committed Nov 6, 2017
    Copy the full SHA
    cf42b36 View commit details
  9. fixes test

    Jordi Puigdellívol committed Nov 6, 2017
    Copy the full SHA
    609e57e View commit details

Commits on Nov 8, 2017

  1. showing bug icon if issue has bug

    Jordi Puigdellívol committed Nov 8, 2017
    Copy the full SHA
    0560b60 View commit details
  2. Added ticktet idea text

    Jordi Puigdellívol committed Nov 8, 2017
    Copy the full SHA
    cc01ded View commit details
  3. Apply fixes from StyleCI

    BadChoice authored and StyleCIBot committed Nov 8, 2017
    Copy the full SHA
    25db9ad View commit details
  4. Merge pull request #91 from BadChoice/analysis-qr0aeZ

    Apply fixes from StyleCI
    BadChoice authored Nov 8, 2017
    Copy the full SHA
    18df290 View commit details
Showing 419 changed files with 30,739 additions and 49,475 deletions.
9 changes: 6 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -35,7 +35,8 @@ MAIL_FETCH_PORT=110
MAIL_FETCH_USERNAME=hello@handesk.com
MAIL_FETCH_PASSWORD=secret-password
MAIL_FETCH_OPTIONS=/pop3
// for options check https://secure.php.net/manual/de/function.imap-open.php
MAIL_FETCH_USE_SSL=true
# for options check https://secure.php.net/manual/de/function.imap-open.php

MAIL_SSLOPTIONS_ALLOW_SELF_SIGNED=false
MAIL_SSLOPTIONS_VERIFY_PEER=true
@@ -45,7 +46,9 @@ PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=

# Leave ISSUES_DRIVER empty to not use any
ISSUES_DRIVER=bitbucket
BITBUCKET_USER=bitbucket-user-if-using-basic-auth
BITBUCKET_PASSWORD=bitbucket-password-if-using-basic-auth
BITBUCKET_KEY=the-bitbucket-key-if-using-oauth
BITBUCKET_SECRET=the-bitbucket-secret-using-oauth
BITBUCKET_OAUTH_KEY=bitbucket-oauth-key
BITBUCKET_OAUTH_SECRET=bitbucket-oauth-secret
76 changes: 76 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<IfModule mod_rewrite.c>
#Session timeout

<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^$1 [N]

RewriteCond %{REQUEST_URI} (\.\w+$) [NC]
RewriteRule ^(.*)$ public/$1

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php

</IfModule>


<IfModule mod_expires.c>
ExpiresActive On

# Images
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"

# Video
ExpiresByType video/webm "access plus 1 year"
ExpiresByType video/mp4 "access plus 1 year"
ExpiresByType video/mpeg "access plus 1 year"

# Fonts
ExpiresByType font/ttf "access plus 1 year"
ExpiresByType font/otf "access plus 1 year"
ExpiresByType font/woff "access plus 1 year"
ExpiresByType font/woff2 "access plus 1 year"
ExpiresByType application/font-woff "access plus 1 year"

# CSS, JavaScript
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"

# Others
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
</IfModule>


<IfModule php7_module>
php_flag display_errors Off
php_value upload_max_filesize 10000000M
php_value post_max_size 10000000M
php_value max_execution_time 60000000
php_value max_input_time 10000000
php_value memory_limit 10000000M
php_value max_file_uploads 100
php_value default_socket_timeout 60000000
</IfModule>

## Disable index view
#Options -Indexes
#
## Hide a specific file
#<Files .env>
# Order allow,deny
# Deny from all
#</Files>
2 changes: 0 additions & 2 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -5,8 +5,6 @@ risky: false
enabled:
- align_double_arrow
- align_equals
- phpdoc_order
- phpdoc_separation

disabled:
- unalign_equals
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ language: php

php:
# - '5.6'
- '7.0.8'
- '7.4'
#- '7.1'

sudo: false
@@ -20,4 +20,4 @@ notifications:
recipients:
- hello@handesk.io
on_success: never
on_failure: always
on_failure: always
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
FROM php:7.1.7-fpm
FROM php:7.2.0-fpm
MAINTAINER Mofesola Babalola <me@mofesola.com>

RUN apt update && apt install -y wget
RUN wget -O - https://download.newrelic.com/548C16BF.gpg | apt-key add - \
&& sh -c 'echo "deb http://apt.newrelic.com/debian/ newrelic non-free" \
> /etc/apt/sources.list.d/newrelic.list'
RUN apt update && apt install -y wget gnupg
RUN wget -O- https://download.newrelic.com/548C16BF.gpg | apt-key add -
RUN echo "deb http://apt.newrelic.com/debian/ newrelic non-free" >> /etc/apt/sources.list.d/newrelic.list

RUN apt update && apt install -y git \
zip \
@@ -20,7 +19,7 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install pdo pdo_mysql soap mbstring tokenizer xml imap

RUN pecl install xdebug-2.5.0
RUN pecl install xdebug-2.9.0

RUN newrelic-install install
COPY scripts/newrelic.ini /usr/local/etc/php/conf.d/
153 changes: 153 additions & 0 deletions Envoy.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
@setup
require __DIR__.'/vendor/autoload.php';
$dotenv = new Dotenv\Dotenv(__DIR__);
try {
$dotenv->load();
$dotenv->required(['DEPLOY_SERVER', 'DEPLOY_REPOSITORY', 'DEPLOY_PATH'])->notEmpty();
} catch ( Exception $e ) {
echo $e->getMessage();
}

$server = getenv('DEPLOY_SERVER');
$repo = getenv('DEPLOY_REPOSITORY');
$path = getenv('DEPLOY_PATH');
$slack = getenv('DEPLOY_SLACK_WEBHOOK');
$healthUrl = getenv('DEPLOY_HEALTH_CHECK');

if ( substr($path, 0, 1) !== '/' ) throw new Exception('Careful - your deployment path does not begin with /');

$date = ( new DateTime )->format('Y-m-d_H:i:s');
$env = isset($env) ? $env : "production";
$branch = isset($branch) ? $branch : "master";
$path = rtrim($path, '/');
$release = $path.'/'.$date;
@endsetup


@servers(['web' => $server])
{{--@servers(['localhost' => '127.0.0.1'])--}}

@task('init')
if [ ! -d {{ $path }}/current ]; then
cd {{ $path }}
git clone {{ $repo }} --branch={{ $branch }} --depth=1 -q {{ $release }}
echo "Repository cloned"
mv {{ $release }}/storage {{ $path }}/storage
ln -s {{ $path }}/storage {{ $release }}/storage
ln -s {{ $path }}/storage/public {{ $release }}/public/storage
echo "Storage directory set up"
cp {{ $release }}/.env.example {{ $path }}/.env
ln -s {{ $path }}/.env {{ $release }}/.env
echo "Environment file set up"
rm -rf {{ $release }}
echo "Deployment path initialised. Run 'envoy run deploy' now."
else
echo "Deployment path already initialised (current symlink exists)!"
fi
@endtask

@story('deploy')
deployment_git
deployment_links
deployment_composer
deployment_migrate
deployment_cache
deployment_update_current
health_check
deployment_option_cleanup
@endstory

@story('deploy_cleanup')
deployment_git
deployment_links
deployment_composer
deployment_migrate
deployment_cache
deployment_update_current
health_check
deployment_cleanup
@endstory

@story('rollback')
deployment_rollback
health_check
@endstory

@task('deployment_git')
cd {{ $path }}
echo "Deployment ({{ $date }}) started"
git clone {{ $repo }} --branch={{ $branch }} --depth=1 -q {{ $release }}
echo "Repository cloned"
@endtask

@task('deployment_links')
cd {{ $path }}
rm -rf {{ $release }}/storage
ln -s {{ $path }}/storage {{ $release }}/storage
ln -s {{ $path }}/storage/public {{ $release }}/public/storage
echo "Storage directories set up"
ln -s {{ $path }}/.env {{ $release }}/.env
echo "Environment file set up"
@endtask

@task('deployment_composer')
echo "Installing composer depencencies..."
cd {{ $release }}
composer install --no-interaction --quiet --no-dev --prefer-dist --optimize-autoloader
@endtask

@task('deployment_migrate')
php {{ $release }}/artisan migrate --env={{ $env }} --force --no-interaction
@endtask

@task('deployment_cache')
php {{ $release }}/artisan view:clear --quiet
php {{ $release }}/artisan cache:clear --quiet
php {{ $release }}/artisan config:cache --quiet
php {{ $release }}/artisan queue:restart --quiet
echo 'Cache cleared'
@endtask

@task('deployment_update_current')
ln -nfs {{ $release }} {{ $path }}/current
chmod -R 777 {{ $path }}/storage
echo "Deployment ({{ $date }}) finished"
@endtask

@task('deployment_cleanup')
cd {{ $path }}
#find . -maxdepth 1 -name "20*" -mmin +2880 | head -n 5 | xargs rm -Rf
find . -maxdepth 1 -name "20*" | sort | head -n -4 | xargs rm -Rf
echo "Cleaned up old deployments"
@endtask

@task('deployment_option_cleanup')
cd {{ $path }}
@if ( isset($cleanup) && $cleanup )
#find . -maxdepth 1 -name "20*" -mmin +2880 | head -n 5 | xargs rm -Rf
find . -maxdepth 1 -name "20*" | sort | head -n -4 | xargs rm -Rf
echo "Cleaned up old deployments"
@endif
@endtask


@task('health_check')
if [ "$(curl --write-out "%{http_code}\n" --silent --output /dev/null {{ $healthUrl }})" == "200" ]; then
printf "\033[0;32mHealth check to {{ $healthUrl }} OK\033[0m\n"
else
printf "\033[1;31mHealth check to {{ $healthUrl }} FAILED\033[0m\n"
fi
@endtask


@task('deployment_rollback')
cd {{ $path }}
ln -nfs {{ $path }}/$(find . -maxdepth 1 -name "20*" | sort | tail -n 2 | head -n1) {{ $path }}/current
echo "Rolled back to $(find . -maxdepth 1 -name "20*" | sort | tail -n 2 | head -n1)"
@endtask


@finished
@slack($slack, '#support', "Deployment on {$server}: {$date} complete")
@endfinished

7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright <YEAR> <COPYRIGHT HOLDER>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4 changes: 4 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

## Reporting a Vulnerability

If you discover any security related issues, please email hello@codepassion.io instead of using the issue tracker.
2 changes: 1 addition & 1 deletion app/Attachment.php
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@

namespace App;

use PhpImap\IncomingMail;
use Illuminate\Support\Facades\Storage;
use PhpImap\IncomingMail;

class Attachment extends BaseModel
{
5 changes: 3 additions & 2 deletions app/Authenticatable/Admin.php
Original file line number Diff line number Diff line change
@@ -11,8 +11,9 @@ class Admin extends User

protected static $role = ['admin' => true];

public static function notifyAll($notification)
public static function notifyAll($notification, $except = null)
{
Notification::send(self::all(), $notification);
$admins = $except ? self::all()->diff($except) : self::all();
Notification::send($admins, $notification);
}
}
4 changes: 2 additions & 2 deletions app/Authenticatable/HasParentModel.php
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@

namespace App\Authenticatable;

use ReflectionClass;
use Illuminate\Support\Str;
use ReflectionClass;

trait HasParentModel
{
@@ -28,7 +28,7 @@ public function getForeignKey()
return Str::snake(class_basename($this->getParentClass())).'_'.$this->primaryKey;
}

public function joiningTable($related)
public function joiningTable($related, $INSTANCE = null)
{
$models = [
Str::snake(class_basename($related)),
Loading