diff --git a/.github/workflows/check-dependencies.yml b/.github/workflows/check-dependencies.yml new file mode 100644 index 000000000..17caf3aa6 --- /dev/null +++ b/.github/workflows/check-dependencies.yml @@ -0,0 +1,19 @@ +name: Check dependencies + +# Adapted from https://google.github.io/osv-scanner/github-action/#scan-on-pull-request + +on: + pull_request: + branches: [main, 1.*.x] + merge_group: + branches: [main, 1.*.x] + +permissions: + # Require writing security events to upload SARIF file to security tab + security-events: write + # Only need to read contents + contents: read + +jobs: + scan-pr: + uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@v1.7.1" \ No newline at end of file diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 053f0191a..5987eeeb0 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -18,6 +18,6 @@ jobs: days-before-close: 14 remove-stale-when-updated: true close-issue-message: "This issue has been closed due to inactivity. If you still require assistance, please provide the requested information." - close-issue-reason: "not-planned" + close-issue-reason: "not_planned" operations-per-run: 100 only-labels: "question" diff --git a/app/config/errors.php b/app/config/errors.php index 47bb6d834..287e639f6 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -11,7 +11,7 @@ return [ /** General Errors */ Exception::GENERAL_UNKNOWN => [ 'name' => Exception::GENERAL_UNKNOWN, - 'description' => 'An unknown error has occured. Please check the logs for more information.', + 'description' => 'An unknown error has occurred. Please check the logs for more information.', 'code' => 500, ], Exception::GENERAL_MOCK => [ @@ -284,7 +284,7 @@ return [ ], Exception::USER_CHALLENGE_REQUIRED => [ 'name' => Exception::USER_CHALLENGE_REQUIRED, - 'description' => 'A recently succeessful challenge is required to complete this action. A challenge is considered recent for 5 minutes.', + 'description' => 'A recently successful challenge is required to complete this action. A challenge is considered recent for 5 minutes.', 'code' => 401, ], Exception::USER_OAUTH2_BAD_REQUEST => [ @@ -489,7 +489,7 @@ return [ ], Exception::REPOSITORY_NOT_FOUND => [ 'name' => Exception::REPOSITORY_NOT_FOUND, - 'description' => 'Repository with the requested ID could not be found. Check to see if the ID is correct, or create the respository.', + 'description' => 'Repository with the requested ID could not be found. Check to see if the ID is correct, or create the repository.', 'code' => 404, ], Exception::PROVIDER_CONTRIBUTION_CONFLICT => [ @@ -499,7 +499,7 @@ return [ ], Exception::GENERAL_PROVIDER_FAILURE => [ 'name' => Exception::GENERAL_PROVIDER_FAILURE, - 'description' => 'VCS (Version Control System) provider failed to proccess the request. We believe this is an error with the VCS provider. Try again, or contact support for more information.', + 'description' => 'VCS (Version Control System) provider failed to process the request. We believe this is an error with the VCS provider. Try again, or contact support for more information.', 'code' => 400, ], diff --git a/app/init.php b/app/init.php index 5165f64d7..f69bd323c 100644 --- a/app/init.php +++ b/app/init.php @@ -837,7 +837,7 @@ $register->set('pools', function () { /** * Get Resource * - * Creation could be reused accross connection types like database, cache, queue, etc. + * Creation could be reused across connection types like database, cache, queue, etc. * * Resource assignment to an adapter will happen below. */ @@ -847,7 +847,7 @@ $register->set('pools', function () { $resource = function () use ($dsnHost, $dsnPort, $dsnUser, $dsnPass, $dsnDatabase) { return new PDOProxy(function () use ($dsnHost, $dsnPort, $dsnUser, $dsnPass, $dsnDatabase) { return new PDO("mysql:host={$dsnHost};port={$dsnPort};dbname={$dsnDatabase};charset=utf8mb4", $dsnUser, $dsnPass, array( - // No need to set PDO::ATTR_ERRMODE it is overwitten in PDOProxy + // No need to set PDO::ATTR_ERRMODE it is overwritten in PDOProxy PDO::ATTR_TIMEOUT => 3, // Seconds PDO::ATTR_PERSISTENT => true, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, diff --git a/src/Appwrite/Platform/Tasks/CalcTierStats.php b/src/Appwrite/Platform/Tasks/CalcTierStats.php index 2d7dd3403..ae8bd27fe 100644 --- a/src/Appwrite/Platform/Tasks/CalcTierStats.php +++ b/src/Appwrite/Platform/Tasks/CalcTierStats.php @@ -103,7 +103,7 @@ class CalcTierStats extends Action return; } catch (\Throwable $th) { - Console::error("Unexpected error occured with Project ID {$projectId}"); + Console::error("Unexpected error occurred with Project ID {$projectId}"); Console::error('[Error] Type: ' . get_class($th)); Console::error('[Error] Message: ' . $th->getMessage()); Console::error('[Error] File: ' . $th->getFile()); @@ -129,7 +129,7 @@ class CalcTierStats extends Action $data = $this->getData($project, $dbForConsole, $dbForProject); $csv->insertOne($data); } catch (\Throwable $th) { - Console::error("Unexpected error occured with Project ID {$projectId}"); + Console::error("Unexpected error occurred with Project ID {$projectId}"); Console::error('[Error] Type: ' . get_class($th)); Console::error('[Error] Message: ' . $th->getMessage()); Console::error('[Error] File: ' . $th->getFile()); diff --git a/src/Appwrite/Platform/Tasks/CreateInfMetric.php b/src/Appwrite/Platform/Tasks/CreateInfMetric.php index c50b6e09f..ce3484edb 100644 --- a/src/Appwrite/Platform/Tasks/CreateInfMetric.php +++ b/src/Appwrite/Platform/Tasks/CreateInfMetric.php @@ -50,7 +50,7 @@ class CreateInfMetric extends Action $dbForProject = call_user_func($getProjectDB, $project); $this->getUsageData($dbForProject, $project); } catch (\Throwable $th) { - Console::error("Unexpected error occured with Project ID {$projectId}"); + Console::error("Unexpected error occurred with Project ID {$projectId}"); Console::error('[Error] Type: ' . get_class($th)); Console::error('[Error] Message: ' . $th->getMessage()); Console::error('[Error] File: ' . $th->getFile()); @@ -72,7 +72,7 @@ class CreateInfMetric extends Action $dbForProject = call_user_func($getProjectDB, $project); $this->getUsageData($dbForProject, $project); } catch (\Throwable $th) { - Console::error("Unexpected error occured with Project ID {$projectId}"); + Console::error("Unexpected error occurred with Project ID {$projectId}"); Console::error('[Error] Type: ' . get_class($th)); Console::error('[Error] Message: ' . $th->getMessage()); Console::error('[Error] File: ' . $th->getFile()); diff --git a/src/Appwrite/Platform/Tasks/PatchRecreateRepositoriesDocuments.php b/src/Appwrite/Platform/Tasks/PatchRecreateRepositoriesDocuments.php index 9cf65d05b..a7e2367d5 100644 --- a/src/Appwrite/Platform/Tasks/PatchRecreateRepositoriesDocuments.php +++ b/src/Appwrite/Platform/Tasks/PatchRecreateRepositoriesDocuments.php @@ -42,7 +42,7 @@ class PatchRecreateRepositoriesDocuments extends Action $dbForProject = call_user_func($getProjectDB, $project); $this->recreateRepositories($dbForConsole, $dbForProject, $project); } catch (\Throwable $th) { - Console::error("Unexpected error occured with Project ID {$projectId}"); + Console::error("Unexpected error occurred with Project ID {$projectId}"); Console::error('[Error] Type: ' . get_class($th)); Console::error('[Error] Message: ' . $th->getMessage()); Console::error('[Error] File: ' . $th->getFile()); @@ -64,7 +64,7 @@ class PatchRecreateRepositoriesDocuments extends Action $dbForProject = call_user_func($getProjectDB, $project); $this->recreateRepositories($dbForConsole, $dbForProject, $project); } catch (\Throwable $th) { - Console::error("Unexpected error occured with Project ID {$projectId}"); + Console::error("Unexpected error occurred with Project ID {$projectId}"); Console::error('[Error] Type: ' . get_class($th)); Console::error('[Error] Message: ' . $th->getMessage()); Console::error('[Error] File: ' . $th->getFile());