Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
krugazul committed Jan 15, 2021
2 parents 02930a4 + a95e48f commit f8bf01c
Show file tree
Hide file tree
Showing 109 changed files with 5,493 additions and 10,413 deletions.
56 changes: 56 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
version: "2"
checks:
argument-count:
enabled: true
config:
threshold: 15
complex-logic:
enabled: true
config:
threshold: 15
file-lines:
enabled: false
method-complexity:
enabled: true
config:
threshold: 25
method-count:
enabled: true
config:
threshold: 25
method-lines:
enabled: false
nested-control-flow:
enabled: false
return-statements:
enabled: false
similar-code:
enabled: false
identical-code:
enabled: true
plugins:
eslint:
enabled: true
csslint:
enabled: true
scss-lint:
enabled: true
exclude_patterns:
- "tests/"
- "sample-data/"
- "i18n/"
- "bin/"
- "languages/"
- "includes/classes/legacy/"
- "vendor/"
- "config/"
- "db/"
- "dist/"
- "features/"
- "**/node_modules/"
- "script/"
- "**/spec/"
- "**/test/"
- "**/tests/"
- "**/vendor/"
- "**/*.d.ts"
23 changes: 23 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
codecov:
notify:
require_ci_to_pass: yes

coverage:
precision: 2
round: nearest
range: "50...100"

status:
project: off
patch: off
changes: off

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

comment: false
44 changes: 31 additions & 13 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,17 +1,35 @@
# Set default behaviour, in case users don't have core.autocrlf set.
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
* text eol=lf
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text
# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.eot binary
*.otf binary
*.ttf binary
*.woff binary
*.woff2 binary

# Files to exclude when creating archive.
.wordpress-org export-ignore
.github export-ignore
.editor* export-ignore
.eslint* export-ignore
.git* export-ignore
.mergify.yml export-ignore
.scrutinizer.yml export-ignore
.travis.yml export-ignore
*.md export-ignore
*.json export-ignore
*sublime-project export-ignore
/.* export-ignore
bin export-ignore
CODE_OF_CONDUCT.md export-ignore
CHANGELOG.txt export-ignore
codesniffer.ruleset.xml export-ignore
gulpfile.js export-ignore
composer.* export-ignore
gulpfile.js export-ignore
Gruntfile.js export-ignore
package.json export-ignore
package-lock.json export-ignore
phpcs.xml export-ignore
phpunit.* export-ignore
README.md export-ignore
tests export-ignore
renovate.json export-ignore
sublime-project export-ignore
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "03:00"
timezone: Africa/Johannesburg
open-pull-requests-limit: 99
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "03:00"
timezone: Africa/Johannesburg
open-pull-requests-limit: 99
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
time: "03:00"
timezone: Africa/Johannesburg
open-pull-requests-limit: 99
19 changes: 19 additions & 0 deletions .github/workflows/broken-link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
schedule:
- cron: 1 13 2 * *
repository_dispatch:
types: [check-link]
workflow_dispatch:

name: Broken Link Check
jobs:
check:
name: Broken Link Check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: technote-space/auto-cancel-redundant-job@v1
with:
EXCLUDE_MERGED: 'true'
- name: Broken Link Check
uses: technote-space/broken-link-checker-action@gh-actions
15 changes: 15 additions & 0 deletions .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Cancel
on: pull_request
jobs:
cancel:
name: 'Cancel Previous Runs'
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Get all workflow ids and set to env variable
run: echo ::set-env name=WORKFLOW_IDS_TO_CANCEL::$(curl https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/workflows -s | jq -r '.workflows | map(.id|tostring) | join(",")')

- uses: styfle/[email protected]
with:
workflow_id: ${{ env.WORKFLOW_IDS_TO_CANCEL }}
access_token: ${{ secrets.GITHUB_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/check-php-syntax-errors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: PHP syntax

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Checking PHP syntax error
uses: overtrue/phplint@master
with:
path: .
options: --exclude=*.log
62 changes: 62 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: "CodeQL"

on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 22 * * 3'

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

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['javascript']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
45 changes: 45 additions & 0 deletions .github/workflows/ossar-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow integrates a collection of open source static analysis tools
# with GitHub code scanning. For documentation, or to provide feedback, visit
# https://github.com/github/ossar-action
name: OSSAR

on:
push:
pull_request:

jobs:
OSSAR-Scan:
# OSSAR runs on windows-latest.
# ubuntu-latest and macos-latest support coming soon
runs-on: windows-latest

steps:
# Checkout your code repository to scan
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Install dotnet, used by OSSAR
- name: Install .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.201'

# Run open source static analysis tools
- name: Run OSSAR
uses: github/ossar-action@v1
id: ossar

# Upload results to the Security tab
- name: Upload OSSAR results
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: ${{ steps.ossar.outputs.sarifFile }}
19 changes: 19 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Mark stale issues and pull requests

on:
schedule:
- cron: "30 1 * * *"

jobs:
stale:

runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ node_modules
.sass-cache
.idea
*.sublime-workspace
package-lock.json
vendor
wp-content
package.json
46 changes: 23 additions & 23 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
pull_request_rules:
- name: automatic merge for Dependabot pull requests
conditions:
- author~=^dependabot(|-preview)\[bot\]$
actions:
merge:
method: merge
- name: automatic merge for Renovate pull requests
conditions:
- author=renovate[bot]
actions:
merge:
method: merge
- name: automatic merge for ImgBot pull requests
conditions:
- author=imgbot[bot]
actions:
merge:
method: merge
- name: delete head branch on merged pull requests
conditions:
- merged
actions:
pull_request_rules:
- name: automatic merge for Dependabot pull requests
conditions:
- author~=^dependabot(|-preview)\[bot\]$
actions:
merge:
method: merge
- name: automatic merge for Renovate pull requests
conditions:
- author=renovate[bot]
actions:
merge:
method: merge
- name: automatic merge for ImgBot pull requests
conditions:
- author=imgbot[bot]
actions:
merge:
method: merge
- name: delete head branch on merged pull requests
conditions:
- merged
actions:
delete_head_branch:
Loading

0 comments on commit f8bf01c

Please sign in to comment.