Skip to content

Commit

Permalink
Merge pull request #1408 from hydephp/code-cleanup
Browse files Browse the repository at this point in the history
Remove low priority todo comments
  • Loading branch information
caendesilva committed Oct 28, 2023
2 parents 409fbe1 + 8be4c36 commit d5b24d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .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" ]
Expand All @@ -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
Expand Down
Expand Up @@ -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'),
Expand Down

0 comments on commit d5b24d8

Please sign in to comment.