Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: File reminders backend #39651

Merged
merged 38 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e16001b
feat: init files_reminders migration
Pytal Jul 31, 2023
59a2ef4
feat(files_reminders): add Application
Pytal Jul 31, 2023
b75fac3
feat(files_reminders): add info xml
Pytal Jul 31, 2023
a3ac1b8
feat(files_reminders): add background jobs
Pytal Jul 31, 2023
ea5e128
feat(files_reminders): add service and notifier
Pytal Jul 31, 2023
c8a32a7
feat(files_reminders): add list command
Pytal Jul 31, 2023
163b059
enh: use datetime
Pytal Jul 31, 2023
4fabd77
enh: add created at
Pytal Jul 31, 2023
774e3e6
enh: implement JsonSerializable
Pytal Jul 31, 2023
a7892fb
feat(files_reminders): add api controller
Pytal Jul 31, 2023
cfbac9b
fix: add composer autoload
Pytal Jul 31, 2023
beb8a27
enh: add to shipped
Pytal Jul 31, 2023
fa77564
enh: rename to due date
Pytal Jul 31, 2023
7637bf2
fix: catch Throwable
Pytal Jul 31, 2023
5ff178a
enh: add updated at
Pytal Jul 31, 2023
8870585
feat(files_reminders): create or update
Pytal Jul 31, 2023
05e454e
fix: update find due query
Pytal Jul 31, 2023
777a791
feat(files_reminders): add remove endpoint
Pytal Jul 31, 2023
d31302e
fix: create only if file exists
Pytal Jul 31, 2023
bdf0741
enh: return created status code
Pytal Jul 31, 2023
b04d1a7
enh: comment interval
Pytal Jul 31, 2023
db7f5a2
enh: serialize path
Pytal Jul 31, 2023
9bd7ddd
enh: does not exist return null
Pytal Jul 31, 2023
3ade06c
fix: return ocs data
Pytal Jul 31, 2023
7daf11f
fix: remove throwable handling
Pytal Jul 31, 2023
7617519
fix: construct background jobs
Pytal Jul 31, 2023
f865c3a
enh: handle node deleted
Pytal Aug 1, 2023
9e8354e
fix: exit on reminder not found
Pytal Aug 1, 2023
c4b7056
fix: catch NodeNotFoundException in notifier
Pytal Aug 1, 2023
7beef65
enh: highlight filename
Pytal Aug 1, 2023
7381c80
fix: remove unnecessary parsed subject
Pytal Aug 1, 2023
d619166
fix: return null if table exists
Pytal Aug 1, 2023
113d061
enh: add codeowner
Pytal Aug 1, 2023
e320166
enh: add json output to command
Pytal Aug 1, 2023
2c4b562
fix: ignore non-existing
Pytal Aug 1, 2023
af98c70
fix(ci): add to enabled apps
Pytal Aug 1, 2023
5a11535
fix: set endpoint description
Pytal Aug 2, 2023
a806bd0
enh: handle user deleted
Pytal Aug 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/apps/federation/appinfo/info.xml @datenangebot
/apps/files/appinfo/info.xml @skjnldsv @Pytal @ArtificialOwl @come-nc @artonge @icewind1991 @szaimen @susnux @Fenn-CS
/apps/files_external/appinfo/info.xml @icewind1991 @artonge
/apps/files_reminders/appinfo/info.xml @Pytal
/apps/files_sharing/appinfo/info.xml @skjnldsv @come-nc
/apps/files_trashbin/appinfo/info.xml @Pytal @icewind1991
/apps/files_versions/appinfo/info.xml @artonge @icewind1991
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
!/apps/sharebymail
!/apps/encryption
!/apps/files_external
!/apps/files_reminders
!/apps/files_sharing
!/apps/files_trashbin
!/apps/files_versions
Expand Down
32 changes: 32 additions & 0 deletions apps/files_reminders/appinfo/info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0"?>
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>files_reminders</id>
<name>File reminders</name>
<summary>Set file reminders</summary>
<description><![CDATA[**📣 File reminders**

Set file reminders.
]]></description>
<version>0.1.0-dev</version>
<licence>agpl</licence>
<author>Christopher Ng</author>
<namespace>FilesReminders</namespace>

<category>files</category>

<bugs>https://github.com/nextcloud/server/issues</bugs>

<dependencies>
<nextcloud min-version="27" max-version="28" />
</dependencies>

<background-jobs>
<job>OCA\FilesReminders\BackgroundJob\CleanUpReminders</job>
<job>OCA\FilesReminders\BackgroundJob\ScheduledNotifications</job>
</background-jobs>

<commands>
<command>OCA\FilesReminders\Command\ListCommand</command>
</commands>
</info>
37 changes: 37 additions & 0 deletions apps/files_reminders/appinfo/routes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

declare(strict_types=1);

/**
* @copyright 2023 Christopher Ng <[email protected]>
*
* @author Christopher Ng <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

$requirements = [
'version' => '1',
];

return [
'ocs' => [
['name' => 'Api#get', 'url' => '/api/v{version}/get/{fileId}', 'verb' => 'GET', 'requirements' => $requirements],
['name' => 'Api#set', 'url' => '/api/v{version}/set/{fileId}', 'verb' => 'PUT', 'requirements' => $requirements],
['name' => 'Api#remove', 'url' => '/api/v{version}/remove/{fileId}', 'verb' => 'DELETE', 'requirements' => $requirements],
],
];
25 changes: 25 additions & 0 deletions apps/files_reminders/composer/autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

// autoload.php @generated by Composer

if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitFilesReminders::getLoader();
13 changes: 13 additions & 0 deletions apps/files_reminders/composer/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"config" : {
"vendor-dir": ".",
"optimize-autoloader": true,
"classmap-authoritative": true,
"autoloader-suffix": "FilesReminders"
},
"autoload" : {
"psr-4": {
"OCA\\FilesReminders\\": "../lib/"
}
}
}
18 changes: 18 additions & 0 deletions apps/files_reminders/composer/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading