Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
infinitydaemon committed Jun 16, 2024
1 parent e83a467 commit 172fbc6
Show file tree
Hide file tree
Showing 50 changed files with 947 additions and 844 deletions.
2 changes: 2 additions & 0 deletions admin/.codespellignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ede
EDE
39 changes: 39 additions & 0 deletions admin/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# EditorConfig is awesome: https://editorconfig.org/

# top-most EditorConfig file
root = true

# A newline ending every file
[*]
insert_final_newline = true
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true

[*.css]
indent_size = 2

[*.js]
indent_size = 2

[package.json]
indent_size = 2

[.yamllint.conf]
indent_size = 2

[*.yml]
indent_size = 2

[*.md]
indent_size = 2

# Ignore paths
[**/vendor/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset
1 change: 1 addition & 0 deletions admin/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
38 changes: 38 additions & 0 deletions admin/.github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
**In raising this issue, I confirm the following:** `{please fill the checkboxes, e.g: [X]}`

- [] I have read and understood the [contributors guide](https://github.com/pi-hole/AdminLTE/blob/master/CONTRIBUTING.md).
- [] The issue I am reporting can be _replicated_.
- [] The issue I am reporting isn't a duplicate (see [FAQs](https://github.com/pi-hole/pi-hole/wiki/FAQs), [closed issues](https://github.com/pi-hole/AdminLTE/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), and [open issues](https://github.com/pi-hole/AdminLTE/issues)).

**How familiar are you with the the source code relevant to this issue?:**

`{Replace this with a number from 1 to 10. 1 being not familiar, and 10 being very familiar}`

---

**Expected behavior:**

`{A detailed description of what you expect to see}`

**Actual behavior:**

`{A detailed description and/or screenshots of what you do see}`

**Steps to reproduce:**

`{Detailed steps of how we can reproduce this}`

**Debug token provided by [uploading `pihole -d` log](https://discourse.pi-hole.net/t/the-pihole-command-with-examples/738#debug):**

`{Alphanumeric token}`

**Troubleshooting undertaken, and/or other relevant information:**

`{Steps of what you have done to fix this}`

> - `{Please delete this quoted section when opening your issue}`
> - You must follow the template instructions. Failure to do so will result in your issue being closed.
> - Please [submit any feature requests here](https://discourse.pi-hole.net/c/feature-requests), so it is votable and trackable by the community.
> - Please respect that Pi-hole is developed by volunteers, who can only reply in their spare time.
> - Detail helps us understand and resolve an issue quicker, but please ensure it's relevant.
> - _This template was created based on the work of [`udemy-dl`](https://github.com/nishad/udemy-dl/blob/master/LICENSE)._
2 changes: 2 additions & 0 deletions admin/.github/dco.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require:
members: false
33 changes: 33 additions & 0 deletions admin/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
day: saturday
time: "10:00"
open-pull-requests-limit: 10
target-branch: devel
versioning-strategy: increase
reviewers:
- "pi-hole/web-maintainers"
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
day: saturday
time: "10:00"
open-pull-requests-limit: 10
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"
7 changes: 7 additions & 0 deletions admin/.github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
changelog:
exclude:
labels:
- internal
authors:
- dependabot
- github-actions
35 changes: 35 additions & 0 deletions admin/.github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "CodeQL"

on:
push:
branches:
- master
- devel
- "!dependabot/**"
pull_request:
# The branches below must be a subset of the branches above
branches:
- master
- devel
schedule:
- cron: "0 0 * * 0"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/[email protected]
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: "javascript"

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
20 changes: 20 additions & 0 deletions admin/.github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Codespell

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
spell-check:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
uses: actions/[email protected]
-
name: Spell-Checking
uses: codespell-project/actions-codespell@master
with:
ignore_words_file: .codespellignore
skip: ./scripts/vendor,./style/vendor,./package.json,./package-lock.json,./composer.json,./composer.lock
14 changes: 14 additions & 0 deletions admin/.github/workflows/editorconfig-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: editorconfig-checker

on:
pull_request:
push:

jobs:
build:
name: editorconfig-checker
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: editorconfig-checker/action-editorconfig-checker@main
- run: editorconfig-checker
21 changes: 21 additions & 0 deletions admin/.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/[email protected]
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."
13 changes: 13 additions & 0 deletions admin/.github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# .github/workflows/php-cs-fixer.yml
on: [push, pull_request]
name: Lint
jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --diff --dry-run
21 changes: 21 additions & 0 deletions admin/.github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PHPStan

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]

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

- name: Run PHPStan
uses: php-actions/phpstan@v3
with:
configuration: phpstan.neon.dist
memory_limit: 256M

26 changes: 26 additions & 0 deletions admin/.github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Mark stale issues

on:
schedule:
- cron: '0 8 * * *'
workflow_dispatch:

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write

steps:
- uses: actions/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30
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, never-stale'
exempt-all-issue-assignees: true
operations-per-run: 300
close-issue-reason: 'not_planned'
35 changes: 35 additions & 0 deletions admin/.github/workflows/stale_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Close stale PR
# This action will add a `stale` label and close immediately every PR that meets the following conditions:
# - it is already marked with "merge conflict" label
# - there was no update/comment on the PR in the last 30 days.

on:
schedule:
- cron: '0 10 * * *'
workflow_dispatch:

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Do not automatically mark PR/issue as stale
days-before-stale: -1
# Override 'days-before-stale' for PR only
days-before-pr-stale: 30
# Close PRs immediately, after marking them 'stale'
days-before-pr-close: 0
# only run the action on merge conflict PR
any-of-labels: 'Merge Conflicts'
exempt-pr-labels: 'internal, never-stale, ON HOLD, WIP'
exempt-all-pr-assignees: true
operations-per-run: 300
stale-pr-message: ''
close-pr-message: 'Existing merge conflicts have not been addressed. This PR is considered abandoned.'
18 changes: 18 additions & 0 deletions admin/.github/workflows/sync-back-to-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Sync Back to Development

on:
push:
branches:
- master

jobs:
sync-branches:
runs-on: ubuntu-latest
name: Syncing branches
steps:
- name: Checkout
uses: actions/[email protected]
- 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:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions admin/.github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Tests

on:
push:
branches:
- devel
- master
pull_request:
branches:
- "**"

env:
FORCE_COLOR: 2

jobs:
run:
name: Node
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/[email protected]

- name: Set up Node.js
uses: actions/[email protected]
with:
node-version: "16.x"
cache: npm

- name: Install npm dependencies
run: npm ci

- name: Run tests
run: npm run testpr
21 changes: 21 additions & 0 deletions admin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
*.DS_Store
.idea
/nbproject/private/
/nbproject/
/node_modules/
TODO
*.zip
test.html
*.log
.php-cs-fixer.cache

# Intellij IDEA Project Files
*.iml
*.ipr
*.iws

# vim
*.swp

# Composer
/vendor/
Loading

0 comments on commit 172fbc6

Please sign in to comment.