From cfe37320e224e86a44594866cf5af061028951ed Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 17:22:03 +0200 Subject: [PATCH 1/2] Remove low priority todo comment from workflow --- .github/workflows/deploy-documentation-preview.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-documentation-preview.yml b/.github/workflows/deploy-documentation-preview.yml index de0d4498b19..830742daee0 100644 --- a/.github/workflows/deploy-documentation-preview.yml +++ b/.github/workflows/deploy-documentation-preview.yml @@ -1,7 +1,5 @@ name: Deploy Documentation Preview -# TODO: Add check to only rerun if docs have changed since last run on the PR - on: pull_request: branches: [ "master" ] @@ -11,7 +9,10 @@ on: jobs: build-documentation-preview: - if: "! contains(github.event.pull_request.labels.*.name, 'pause-pages')" ## Temporary until todo above is fixed + # We could add a check to only rerun if docs have changed since last run on the PR + # But this would require a state storage, and the current version is good enough. + if: "! contains(github.event.pull_request.labels.*.name, 'pause-pages')" + environment: name: pr-documentation-${{ github.event.pull_request.number }} url: https://hydephp.github.io/develop/pr-${{ github.event.pull_request.number }}/dev-docs-preview From 8be4c36ef891657852016f2667ebec295d01d3b3 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 28 Oct 2023 17:29:28 +0200 Subject: [PATCH 2/2] Remove low priority todo comment from code --- .../src/Framework/Features/Blogging/Models/FeaturedImage.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/framework/src/Framework/Features/Blogging/Models/FeaturedImage.php b/packages/framework/src/Framework/Features/Blogging/Models/FeaturedImage.php index 25f80a2b3c5..71bf71ee4ea 100644 --- a/packages/framework/src/Framework/Features/Blogging/Models/FeaturedImage.php +++ b/packages/framework/src/Framework/Features/Blogging/Models/FeaturedImage.php @@ -225,9 +225,7 @@ protected function getContentLengthForLocalImage(): int protected function getContentLengthForRemoteImage(): int { - // TODO: We may want to globalize this check in the config, but for now, - // we just check the server arguments and skip remote requests if - // the --no-api flag is present (in the build command call) + // Check if the --no-api flag is set when running the build command, and if so, skip the API call. if (! (isset($_SERVER['argv']) && in_array('--no-api', $_SERVER['argv'], true))) { $headers = Http::withHeaders([ 'User-Agent' => Config::getString('hyde.http_user_agent', 'RSS Request Client'),