Skip to content

Commit

Permalink
Merge pull request #1038 from nextcloud/dev-1.5
Browse files Browse the repository at this point in the history
Dev 1.5
  • Loading branch information
dartcafe authored Sep 14, 2020
2 parents 7989598 + 2abaff4 commit da39f8c
Show file tree
Hide file tree
Showing 137 changed files with 5,677 additions and 3,008 deletions.
62 changes: 57 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,73 @@ on:
branches:
- master
- stable*
- dev*

jobs:
php-cs-fixer:
runs-on: ubuntu-latest

strategy:
matrix:
php-versions: [7.4]

name: php-cs

steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up php
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
coverage: none
- name: Install dependencies
run: composer i
- name: Run coding standards check
run: composer run cs:check

app-code-check:
runs-on: ubuntu-latest

strategy:
matrix:
php-versions: ['7.2', '7.3', '7.4']
nextcloud-versions: ['master']

name: Nextcloud AppCode check

steps:
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: ctype,curl,dom,gd,iconv,intl,json,mbstring,openssl,posix,sqlite,xml,zip
coverage: xdebug
- name: Checkout Nextcloud ${{ matrix.nextcloud-versions }}
run: git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.nextcloud-versions }} nextcloud
- name: Run tests
run: php -f nextcloud/occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database sqlite --database-pass=''
- name: Checkout
uses: actions/checkout@master
with:
path: nextcloud/apps/mail
- name: Run tests
run: php -f nextcloud/occ app:check-code mail

node:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]
node-versions: [12.x]

name: eslint node ${{ matrix.node-versions }}
steps:
- uses: actions/checkout@v2
- name: Use node ${{ matrix.node-version }}
- name: Use node ${{ matrix.node-versions }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ matrix.node-versions }}
- name: Install dependencies
run: npm ci
- name: ESLint
Expand All @@ -33,14 +85,14 @@ jobs:
matrix:
node-versions: [12.x]

name: stylelint node${{ matrix.node-versions }}
name: stylelint node ${{ matrix.node-versions }}
steps:
- uses: actions/checkout@v2

- name: Set up node ${{ matrix.node-versions }}
uses: actions/setup-node@v1
with:
node-versions: ${{ matrix.node-versions }}
node-version: ${{ matrix.node-versions }}

- name: Install dependencies
run: npm ci
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
.sass-cache/
.php_cs.cache
.project/
.idea/
build/
Expand Down
20 changes: 20 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

declare(strict_types=1);

require_once './vendor/autoload.php';

use Nextcloud\CodingStandard\Config;

$config = new Config();
$config
->getFinder()
->ignoreVCSIgnored(true)
->notPath('build')
->notPath('l10n')
->notPath('lib/Vendor')
->notPath('src')
->notPath('vendor')
->notPath('tests')
->in(__DIR__);
return $config;
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.gif
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
# Changelog
All notable changes to this project will be documented in this file.

## [1.5.0] - tbd
## [1.5.1 - beta2] - 2020-08-17
- Lookup calendars for conflict #1056 #747
- convert URIs in description into clickable links #1067
- added a poll to force poll appear under relevant polls navigation entry for all users #1072
- move cloning of options to backend #1058
- add user settings
- some style fixes
- updated dependencies
- load app icons via url-loader

## [1.5.0 - beta1] - 2020-08-17
- Drop support for Nextcloud 16
- Stop immediatley sending of invitation mails after adding a share #1007 #935
- Fix: Hide usernames in notification mail, if results in poll are hidden #990 #980
- Adding a REST-API #966
Expand All @@ -13,7 +24,8 @@ All notable changes to this project will be documented in this file.
- Changed some icons #862
- Added the ability to confirm options #939 #136
- A lot of refactoring

- Don't invite disabled users #997
- add time zone info to date polls #1076


## [1.4.3] - 2020-05-03
Expand Down
4 changes: 2 additions & 2 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<name>Polls</name>
<summary>A polls app, similar to doodle/dudle with the possibility to restrict access.</summary>
<description>A polls app, similar to doodle/dudle with the possibility to restrict access (members, certain groups/users, hidden and public).</description>
<version>1.5.0</version>
<version>1.5.2</version>
<licence>agpl</licence>
<author>Vinzenz Rosenkranz</author>
<author>René Gieling</author>
Expand All @@ -23,7 +23,7 @@
<screenshot>https://raw.githubusercontent.com/nextcloud/polls/master/screenshots/vote.png</screenshot>
<screenshot>https://raw.githubusercontent.com/nextcloud/polls/master/screenshots/edit-poll.png</screenshot>
<dependencies>
<nextcloud min-version="16" max-version="19" />
<nextcloud min-version="17" max-version="20" />
</dependencies>
<background-jobs>
<job>OCA\Polls\Cron\NotificationCron</job>
Expand Down
94 changes: 53 additions & 41 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,73 +27,79 @@
['name' => 'page#index', 'url' => '/not-found', 'verb' => 'GET', 'postfix' => 'notfound'],
['name' => 'page#index', 'url' => '/list/{id}', 'verb' => 'GET', 'postfix' => 'list'],
['name' => 'page#index', 'url' => '/vote/{id}', 'verb' => 'GET', 'postfix' => 'vote'],

['name' => 'page#vote_public', 'url' => '/s/{token}', 'verb' => 'GET', 'postfix' => 'public'],
['name' => 'page#vote_public', 'url' => '/poll/{token}', 'verb' => 'GET', 'postfix' => 'oldpublic'],

['name' => 'subscription#get', 'url' => '/subscription/{pollId}', 'verb' => 'GET'],
['name' => 'subscription#set', 'url' => '/subscription', 'verb' => 'POST'],

['name' => 'comment#getByToken', 'url' => '/comments/s/{token}', 'verb' => 'GET'],
['name' => 'comment#get', 'url' => '/comments/{pollId}', 'verb' => 'GET'],
['name' => 'comment#add', 'url' => '/comment/add', 'verb' => 'POST'],
['name' => 'comment#delete', 'url' => '/comment/delete', 'verb' => 'POST'],

['name' => 'vote#getByToken', 'url' => '/votes/get/s/{token}', 'verb' => 'GET'],
['name' => 'vote#setByToken', 'url' => '/vote/set/s', 'verb' => 'POST'],
['name' => 'vote#get', 'url' => '/votes/get/{pollId}', 'verb' => 'GET'],
['name' => 'vote#set', 'url' => '/vote/set', 'verb' => 'POST'],
// ['name' => 'vote#write', 'url' => '/vote/write/', 'verb' => 'POST'],
['name' => 'vote#delete', 'url' => '/votes/delete', 'verb' => 'POST'],

['name' => 'option#get', 'url' => '/options/get/{pollId}', 'verb' => 'GET'],
['name' => 'option#add', 'url' => '/option/add', 'verb' => 'POST'],
['name' => 'option#update', 'url' => '/option/update', 'verb' => 'POST'],
['name' => 'option#reorder', 'url' => '/option/reorder', 'verb' => 'POST'],
['name' => 'option#remove', 'url' => '/option/remove', 'verb' => 'POST'],
['name' => 'option#getByToken', 'url' => '/options/get/s/{token}', 'verb' => 'GET'],

['name' => 'poll#get', 'url' => '/polls/get/{pollId}', 'verb' => 'GET', 'postfix' => 'auth'],
['name' => 'poll#get', 'url' => '/polls/get/s/{token}', 'verb' => 'GET', 'postfix' => 'public'],
['name' => 'poll#add', 'url' => '/polls/add', 'verb' => 'POST'],
['name' => 'poll#update', 'url' => '/polls/update/{pollId}', 'verb' => 'PUT'],

['name' => 'poll#list', 'url' => '/polls/list', 'verb' => 'GET'],
['name' => 'poll#delete', 'url' => '/polls/delete/{pollId}', 'verb' => 'GET'],
['name' => 'poll#deletePermanently', 'url' => '/polls/delete/permanent/{pollId}', 'verb' => 'GET'],
['name' => 'poll#clone', 'url' => '/polls/clone/{pollId}', 'verb' => 'GET'],
['name' => 'poll#getParticipantsEmailAddresses', 'url' => '/polls/addresses/{pollId}', 'verb' => 'GET'],

['name' => 'option#list', 'url' => '/polls/{pollId}/options', 'verb' => 'GET'],
['name' => 'option#reorder', 'url' => '/polls/{pollId}/options/reorder', 'verb' => 'POST'],
['name' => 'option#add', 'url' => '/option', 'verb' => 'POST'],
['name' => 'option#update', 'url' => '/option/{optionId}', 'verb' => 'PUT'],
['name' => 'option#delete', 'url' => '/option/{optionId}', 'verb' => 'DELETE'],
['name' => 'option#confirm', 'url' => '/option/{optionId}/confirm', 'verb' => 'PUT'],
['name' => 'option#sequence', 'url' => '/option/{optionId}/sequence', 'verb' => 'POST'],
['name' => 'option#findCalendarEvents', 'url' => '/option/{optionId}/events', 'verb' => 'GET'],
// ['name' => 'option#listByToken', 'url' => '/options/get/s/{token}', 'verb' => 'GET'],

['name' => 'vote#set', 'url' => '/vote/set', 'verb' => 'POST'],
['name' => 'vote#setByToken', 'url' => '/vote/set/s', 'verb' => 'POST'],
['name' => 'vote#delete', 'url' => '/votes/delete', 'verb' => 'POST'],
// ['name' => 'vote#get', 'url' => '/votes/get/{pollId}', 'verb' => 'GET'],
// ['name' => 'vote#getByToken', 'url' => '/votes/get/s/{token}', 'verb' => 'GET'],

['name' => 'share#add', 'url' => '/share/add', 'verb' => 'POST'],
['name' => 'share#delete', 'url' => '/share/delete', 'verb' => 'POST'],
['name' => 'share#createPersonalShare', 'url' => '/share/create/s', 'verb' => 'POST'],
['name' => 'share#get', 'url' => '/share/{token}', 'verb' => 'GET'],
['name' => 'share#personal', 'url' => '/share/personal', 'verb' => 'POST'],
['name' => 'share#delete', 'url' => '/share/delete/{token}', 'verb' => 'DELETE'],
['name' => 'share#sendInvitation', 'url' => '/share/send/{token}', 'verb' => 'POST'],
['name' => 'share#resolveContactGroup', 'url' => '/share/resolveContactGroup/{token}', 'verb' => 'POST'],

// ['name' => 'share#getShares', 'url' => '/shares/get/{pollId}', 'verb' => 'GET'],
// ['name' => 'share#get', 'url' => '/share/get/{token}', 'verb' => 'GET'],
['name' => 'subscription#get', 'url' => '/subscription/{pollId}', 'verb' => 'GET', 'postfix' => 'auth'],
['name' => 'subscription#get', 'url' => '/subscription/s/{token}', 'verb' => 'GET', 'postfix' => 'public'],
['name' => 'subscription#set', 'url' => '/subscription', 'verb' => 'POST'],

['name' => 'acl#getByToken', 'url' => '/acl/get/s/{token}', 'verb' => 'GET'],
['name' => 'acl#get', 'url' => '/acl/get/{id}', 'verb' => 'GET'],
['name' => 'comment#add', 'url' => '/comment', 'verb' => 'POST'],
['name' => 'comment#delete', 'url' => '/comment/{commentId}', 'verb' => 'DELETE'],
// ['name' => 'comment#list', 'url' => '/comments/{pollId}', 'verb' => 'GET'],
// ['name' => 'comment#getByToken', 'url' => '/comments/s/{token}', 'verb' => 'GET'],

// ['name' => 'acl#getByToken', 'url' => '/acl/get/s/{token}', 'verb' => 'GET'],
// ['name' => 'acl#get', 'url' => '/acl/get/{id}', 'verb' => 'GET'],

['name' => 'system#get_site_users_and_groups', 'url' => '/siteusers/get', 'verb' => 'POST'],
['name' => 'system#validate_public_username', 'url' => '/check/username', 'verb' => 'POST'],
['name' => 'system#validate_email_address', 'url' => '/check/emailaddress/{emailAddress}', 'verb' => 'GET'],

// REST-API calls
['name' => 'poll_api#get', 'url' => '/api/v1.0/poll/{pollId}', 'verb' => 'GET'],
['name' => 'poll_api#list', 'url' => '/api/v1.0/polls', 'verb' => 'GET'],
['name' => 'poll_api#add', 'url' => '/api/v1.0/poll/add', 'verb' => 'POST'],
['name' => 'poll_api#clone', 'url' => '/api/v1.0/poll/clone/{pollId}', 'verb' => 'POST'],
['name' => 'poll_api#get', 'url' => '/api/v1.0/poll/{pollId}', 'verb' => 'GET'],
['name' => 'poll_api#add', 'url' => '/api/v1.0/poll', 'verb' => 'POST'],
['name' => 'poll_api#update', 'url' => '/api/v1.0/poll/{pollId}', 'verb' => 'PUT'],
['name' => 'poll_api#delete', 'url' => '/api/v1.0/poll/{pollId}', 'verb' => 'DELETE'],
['name' => 'poll_api#delete', 'url' => '/api/v1.0/poll/permanent/{pollId}', 'verb' => 'DELETE'],
['name' => 'poll_api#enum', 'url' => '/api/v1.0/poll/enum', 'verb' => 'GET'],
['name' => 'poll_api#clone', 'url' => '/api/v1.0/poll/{pollId}/clone', 'verb' => 'POST'],
['name' => 'poll_api#trash', 'url' => '/api/v1.0/poll/{pollId}/trash', 'verb' => 'POST'],
['name' => 'poll_api#getParticipantsEmailAddresses', 'url' => '/api/v1.0/poll/{pollId}/addresses', 'verb' => 'GET'],
['name' => 'poll_api#enum', 'url' => '/api/v1.0/enum/poll', 'verb' => 'GET'],

['name' => 'option_api#list', 'url' => '/api/v1.0/poll/{pollId}/options', 'verb' => 'GET'],
['name' => 'option_api#add', 'url' => '/api/v1.0/option', 'verb' => 'POST'],
['name' => 'option_api#update', 'url' => '/api/v1.0/option', 'verb' => 'PUT'],
['name' => 'option_api#add', 'url' => '/api/v1.0/poll/{pollId}/option', 'verb' => 'POST'],
['name' => 'option_api#update', 'url' => '/api/v1.0/option/{optionId}', 'verb' => 'PUT'],
['name' => 'option_api#delete', 'url' => '/api/v1.0/option/{optionId}', 'verb' => 'DELETE'],
['name' => 'option_api#setOrder', 'url' => '/api/v1.0/option/{optionId}/setorder/{order}', 'verb' => 'PUT'],
['name' => 'option_api#confirm', 'url' => '/api/v1.0/option/{optionId}/confirm', 'verb' => 'PUT'],

['name' => 'comment_api#list', 'url' => '/api/v1.0/poll/{pollId}/comments', 'verb' => 'GET'],
['name' => 'comment_api#add', 'url' => '/api/v1.0/comment', 'verb' => 'POST'],
['name' => 'comment_api#delete', 'url' => '/api/v1.0/comment/{commentId}', 'verb' => 'DELETE'],
['name' => 'vote_api#list', 'url' => '/api/v1.0/poll/{pollId}/votes', 'verb' => 'GET'],
['name' => 'vote_api#set', 'url' => '/api/v1.0/vote', 'verb' => 'POST'],

['name' => 'share_api#list', 'url' => '/api/v1.0/poll/{pollId}/shares', 'verb' => 'GET'],
['name' => 'share_api#get', 'url' => '/api/v1.0/share/{token}', 'verb' => 'GET'],
Expand All @@ -105,7 +111,13 @@
['name' => 'subscription_api#subscribe', 'url' => '/api/v1.0/poll/{pollId}/subscription', 'verb' => 'PUT'],
['name' => 'subscription_api#unsubscribe', 'url' => '/api/v1.0/poll/{pollId}/subscription', 'verb' => 'DELETE'],

['name' => 'vote_api#list', 'url' => '/api/v1.0/poll/{pollId}/votes', 'verb' => 'GET'],
['name' => 'vote_api#set', 'url' => '/api/v1.0/vote', 'verb' => 'POST'],
['name' => 'comment_api#list', 'url' => '/api/v1.0/poll/{pollId}/comments', 'verb' => 'GET'],
['name' => 'comment_api#add', 'url' => '/api/v1.0/comment', 'verb' => 'POST'],
['name' => 'comment_api#delete', 'url' => '/api/v1.0/comment/{commentId}', 'verb' => 'DELETE'],

['name' => 'preferences#write', 'url' => '/preferences/write/', 'verb' => 'POST'],
['name' => 'preferences#get', 'url' => '/preferences/get/', 'verb' => 'GET'],
['name' => 'system#get_site_users_and_groups', 'url' => '/siteusers/get/', 'verb' => 'POST'],
['name' => 'system#validate_public_username', 'url' => '/check/username', 'verb' => 'POST']
]
];
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
"christophwurst/nextcloud": "^18.0",
"phpunit/phpunit": "^8.2",
"league/factory-muffin": "^3.0",
"league/factory-muffin-faker": "^2.0"
"league/factory-muffin-faker": "^2.0",
"nextcloud/coding-standard": "^0.3.0"
},
"scripts": {
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix"
}
}
Loading

0 comments on commit da39f8c

Please sign in to comment.