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

[stable27] feat: File reminders backend #39764

Merged
merged 38 commits into from
Aug 9, 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
43ac71a
feat: init files_reminders migration
Pytal Jul 31, 2023
29a78fe
feat(files_reminders): add Application
Pytal Jul 31, 2023
6da4542
feat(files_reminders): add info xml
Pytal Jul 31, 2023
b195fe7
feat(files_reminders): add background jobs
Pytal Jul 31, 2023
782a462
feat(files_reminders): add service and notifier
Pytal Jul 31, 2023
5aca833
feat(files_reminders): add list command
Pytal Jul 31, 2023
cbbd0c6
enh: use datetime
Pytal Jul 31, 2023
5e8668b
enh: add created at
Pytal Jul 31, 2023
f5036b5
enh: implement JsonSerializable
Pytal Jul 31, 2023
143346b
feat(files_reminders): add api controller
Pytal Jul 31, 2023
ca003e2
fix: add composer autoload
Pytal Jul 31, 2023
bb4134a
enh: add to shipped
Pytal Jul 31, 2023
c0f327d
enh: rename to due date
Pytal Jul 31, 2023
3f668f3
fix: catch Throwable
Pytal Jul 31, 2023
e99f1b0
enh: add updated at
Pytal Jul 31, 2023
f4c7759
feat(files_reminders): create or update
Pytal Jul 31, 2023
fb71f8c
fix: update find due query
Pytal Jul 31, 2023
ab357bf
feat(files_reminders): add remove endpoint
Pytal Jul 31, 2023
332fd3d
fix: create only if file exists
Pytal Jul 31, 2023
8a410f1
enh: return created status code
Pytal Jul 31, 2023
b77a375
enh: comment interval
Pytal Jul 31, 2023
8f54e2c
enh: serialize path
Pytal Jul 31, 2023
67abe99
enh: does not exist return null
Pytal Jul 31, 2023
ee7aff3
fix: return ocs data
Pytal Jul 31, 2023
67df581
fix: remove throwable handling
Pytal Jul 31, 2023
1c6114b
fix: construct background jobs
Pytal Jul 31, 2023
e12ae21
enh: handle node deleted
Pytal Aug 1, 2023
6fc3530
fix: exit on reminder not found
Pytal Aug 1, 2023
fa7985d
fix: catch NodeNotFoundException in notifier
Pytal Aug 1, 2023
3b81da9
enh: highlight filename
Pytal Aug 1, 2023
05436ac
fix: remove unnecessary parsed subject
Pytal Aug 1, 2023
cdaee2b
fix: return null if table exists
Pytal Aug 1, 2023
0ffb367
enh: add codeowner
Pytal Aug 1, 2023
a377862
enh: add json output to command
Pytal Aug 1, 2023
33f30f5
fix: ignore non-existing
Pytal Aug 1, 2023
2e8906f
fix(ci): add to enabled apps
Pytal Aug 1, 2023
dfba8f4
fix: set endpoint description
Pytal Aug 2, 2023
d3991ee
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