Skip to content

Commit

Permalink
Pi-hole web v5.18 (#2463)
Browse files Browse the repository at this point in the history
  • Loading branch information
PromoFaux authored Dec 21, 2022
2 parents a816420 + 01426ff commit ad2d438
Show file tree
Hide file tree
Showing 20 changed files with 508 additions and 374 deletions.
22 changes: 10 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@ updates:
open-pull-requests-limit: 10
target-branch: devel
versioning-strategy: increase
ignore:
- dependency-name: postcss
versions:
- 8.2.6
- 8.2.7
- dependency-name: xo
versions:
- 0.38.1
- dependency-name: autoprefixer
versions:
- 10.2.3
- 10.2.4
reviewers:
- "pi-hole/web-maintainers"
- package-ecosystem: github-actions
Expand All @@ -33,3 +21,13 @@ updates:
target-branch: devel
reviewers:
- "pi-hole/web-maintainers"
- package-ecosystem: composer
directory: "/"
schedule:
interval: weekly
day: saturday
time: "10:00"
open-pull-requests-limit: 10
target-branch: devel
reviewers:
- "pi-hole/web-maintainers"
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.2.0
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.2.0
-
name: Spell-Checking
uses: codespell-project/actions-codespell@master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/editorconfig-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
name: editorconfig-checker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.2.0
- uses: editorconfig-checker/action-editorconfig-checker@main
- run: editorconfig-checker
21 changes: 21 additions & 0 deletions .github/workflows/merge-conflict.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Check for merge conflicts"
on:
# So that PRs touching the same files as the push are updated
push:
# So that the `dirtyLabel` is removed if conflicts are resolve
# We recommend `pull_request_target` so that github secrets are available.
# In `pull_request` we wouldn't be able to change labels of fork PRs
pull_request_target:
types: [synchronize]

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Check if PRs are have merge conflicts
uses: eps1lon/actions-label-merge-conflict@v2.1.0
with:
dirtyLabel: "Merge Conflicts"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly."
2 changes: 1 addition & 1 deletion .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.2.0
- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
Expand Down
33 changes: 10 additions & 23 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,14 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- name: Change PHP version
run: |
sudo update-alternatives --set php /usr/bin/php8.0
sudo update-alternatives --set phar /usr/bin/phar8.0
sudo update-alternatives --set phpdbg /usr/bin/phpdbg8.0
sudo update-alternatives --set php-cgi /usr/bin/php-cgi8.0
sudo update-alternatives --set phar.phar /usr/bin/phar.phar8.0
php -version
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3.0.11
- uses: actions/checkout@v3.2.0

- name: Install composer
uses: php-actions/composer@v6

- name: Run PHPStan
uses: php-actions/phpstan@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run phpstan
run: composer run-script phpstan
configuration: phpstan.neon.dist
memory_limit: 256M

2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
days-before-close: 5
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.'
stale-issue-label: 'stale'
exempt-issue-labels: 'internal, Fixed In Next Release, Bug'
exempt-issue-labels: 'internal, Fixed In Next Release, Bug, never-stale'
exempt-all-issue-assignees: true
operations-per-run: 300
close-issue-reason: 'not_planned'
2 changes: 1 addition & 1 deletion .github/workflows/sync-back-to-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Syncing branches
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.2.0
- name: Opening pull request
run: gh pr create -B devel -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'internal'
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Clone repository
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.2.0

- name: Set up Node.js
uses: actions/setup-node@v3.5.1
Expand Down
6 changes: 3 additions & 3 deletions api_FTL.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
$data['version'] = 3;
}

if (isset($_GET['status'])) {
if (isset($_GET['status']) && $auth) {
$return = callFTLAPI('stats');
if (array_key_exists('FTLnotrunning', $return)) {
$data = array('FTLnotrunning' => true);
Expand All @@ -32,7 +32,7 @@
}
}

if (isset($_GET['summary']) || isset($_GET['summaryRaw']) || !count($_GET)) {
if ((isset($_GET['summary']) || isset($_GET['summaryRaw']) || !count($_GET)) && $auth) {
require_once 'scripts/pi-hole/php/gravity.php';

$return = callFTLAPI('stats');
Expand Down Expand Up @@ -77,7 +77,7 @@
}
}

if (isset($_GET['overTimeData10mins'])) {
if (isset($_GET['overTimeData10mins']) && $auth) {
$return = callFTLAPI('overTime');
if (array_key_exists('FTLnotrunning', $return)) {
$data = array('FTLnotrunning' => true);
Expand Down
5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@
"description": "Pi-hole Dashboard for stats and more",
"require": {
"php": ">=5.4",
"phpstan/phpstan": "^0.12.42"
"phpstan/phpstan": "1.*"
},
"license": "EUPL-1.2",
"minimum-stability": "stable",
"autoload": {
"files": [
"scripts/vendor/qrcode.php"
]
},
"scripts": {
"phpstan": "vendor/phpstan/phpstan/phpstan analyse -c phpstan.neon.dist"
}
}
6 changes: 3 additions & 3 deletions composer.lock

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

Loading

0 comments on commit ad2d438

Please sign in to comment.