Skip to content

Commit

Permalink
update config for dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
mimmi20 committed Aug 26, 2023
1 parent be1f8e3 commit 34839ef
Show file tree
Hide file tree
Showing 17 changed files with 139 additions and 62 deletions.
12 changes: 10 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org

; file-version: 1.0

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
indent_size = 4
trim_trailing_whitespace = true

[{*.php,*.xml}]
[*.{js,ts,json,json5,yml}]
indent_size = 2

[composer.json]
indent_size = 4

[*.md]
Expand Down
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# file-version: 1.0

# text files
* text=auto
*.markdown text eol=lf
*.md text eol=lf
*.js text eol=lf
*.ts text eol=lf
*.css text eol=lf
*.scss text eol=lf
*.json text eol=lf
*.json5 text eol=lf
*.lock text eol=lf
*.html text eol=lf
*.php text eol=lf
Expand Down Expand Up @@ -41,5 +46,7 @@ phpstan.neon export-ignore text eol=lf
phpunit.xml export-ignore text eol=lf
psalm.xml export-ignore text eol=lf
rector.php export-ignore text eol=lf
/test export-ignore
/tests export-ignore
/tools export-ignore
/.github export-ignore
3 changes: 0 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ For details, take a look at the following workflow configuration files:

- [`workflows/continuous-integration.yaml`](workflows/continuous-integration.yaml)
- [`workflows/lock-closed-issues.yaml`](workflows/lock-closed-issues.yaml)
- [`workflows/stale.yaml`](workflows/stale.yaml)

## Coding Standards

We are using [`ergebnis/composer-normalize`](https://github.com/ergebnis/composer-normalize) to normalize `composer.json`.

We are using [`friendsofphp/php-cs-fixer`](https://github.com/FriendsOfPHP/PHP-CS-Fixer) and [`squizlabs/php_codesniffer`](https://github.com/squizlabs/PHP_CodeSniffer) to enforce coding standards in PHP files.

Run
Expand Down
23 changes: 19 additions & 4 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
| Q | A |
| -----------------------| ---------------|
| ua-device-type version | x.y.z |
| PHP version | x.y.z |
| Q | A |
|-----------------|------------|
| project version | x.y.z |
| PHP version | x.y.z |


<!--
Expand All @@ -10,3 +10,18 @@
- Please post code as text (using proper markup). Do not post screenshots of code.
- Replace this comment by the description of your issue.
-->

#### Steps required to reproduce the problem

1.
2.
3.

#### Expected Result

*

#### Actual Result

*

8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates

# file-version: 1.0

version: 2

updates:
Expand All @@ -21,6 +23,9 @@ updates:
# dependency name)
patterns:
- "*"
# update-types:
# - "minor"
# - "patch"
# exclude-patterns:
# - "gc_ruboconfig"

Expand Down Expand Up @@ -70,6 +75,9 @@ updates:
# dependency name)
patterns:
- "*"
# update-types:
# - "minor"
# - "patch"
# exclude-patterns:
# - "gc_ruboconfig"

Expand Down
44 changes: 23 additions & 21 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,71 @@
---
# file-version: 1.0

# Default GitHub labels
- color: ee0701
- color: "ee0701"
name: "bug"
description: "Something isn't working"
- color: cccccc
- color: "cccccc"
name: "duplicate"
description: "This issue or pull request already exists"
- color: a2eeef
- color: "a2eeef"
name: "enhancement"
description: "New feature or request"
- color: 7057ff
- color: "7057ff"
name: "good first issue"
description: "Good for newcomers"
- color: 128a0c
- color: "128a0c"
name: "help wanted"
description: "Extra attention is needed"
- color: e6e6e6
- color: "e6e6e6"
name: "invalid"
description: "This doesn't seem right"
- color: cc317c
- color: "cc317c"
name: "question"
description: "Further information is requested"
- color: ffffff
- color: "ffffff"
name: "wontfix"
description: "This will not be worked on"

# other Labels to all mimmi20 repos
- color: 0025ff
- color: "0025ff"
name: "dependencies"
description: "Pull requests that update a dependency file"
- color: f9d0c4
- color: "f9d0c4"
name: "stale"
description: "no activity"
- color: b60205
- color: "b60205"
name: "bc break"
description: "BC Break"
- color: f4e99c
- color: "f4e99c"
name: "maintenance"
description: "Maintenance"
- color: fbca04
- color: "fbca04"
name: "wishlist"
description: ""
- color: d1260f
- color: "d1260f"
name: "security"
description: ""
- color: e6e6e6
- color: "e6e6e6"
name: "removed"
description: ""
- color: b60205
- color: "b60205"
name: "deprecated"
description: ""
- color: 0075ca
- color: "0075ca"
name: "documentation"
description: "Improvements or additions to documentation"
- color: 84175d
- color: "84175d"
name: "major"
description: "Major change"
- color: d86c28
- color: "d86c28"
name: "minor"
description: "Minor change"
- color: 0a9b47
- color: "0a9b47"
name: "patch"
description: "Patch"

# other Labels to mimmi20/ua-device-type
# other Labels
#- color: 5319e7
# name: "new useragents"
# description: ""
5 changes: 4 additions & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
# file-version: 1.0

template: |
## What’s Changed
Expand Down Expand Up @@ -74,7 +77,7 @@ categories:
- title: "**📦 Documentation:**"
labels:
- "documentation"
# other Labels to mimmi20/ua-device-type
# other Labels
#- title: "**📦 new Useragents:**"
# labels:
# - "new useragents"
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/cleanup-caches.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: cleanup caches by a branch
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

# file-version: 1.0

name: "Cleanup caches by a branch"

on:
pull_request:
types:
Expand All @@ -7,7 +12,7 @@ on:

jobs:
cleanup:
runs-on: ubuntu-latest
runs-on: "ubuntu-20.04"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
Expand Down Expand Up @@ -36,4 +41,4 @@ jobs:
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
25 changes: 15 additions & 10 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#

# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

# file-version: 1.0

name: "CodeQL"

on:
Expand All @@ -24,8 +29,8 @@ on:

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
name: "Analyze"
runs-on: "ubuntu-22.04"
permissions:
actions: read
contents: read
Expand All @@ -35,7 +40,7 @@ jobs:
fail-fast: false
matrix:
language:
- 'javascript'
- "javascript"
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
Expand All @@ -51,10 +56,10 @@ jobs:
persist-credentials: false

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
- name: "Initialize CodeQL"
uses: "github/codeql-action/init@v2"
with:
languages: ${{ matrix.language }}
languages: "${{ matrix.language }}"
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
Expand All @@ -64,8 +69,8 @@ jobs:

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, 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@v2
- name: "Autobuild"
uses: "github/codeql-action/autobuild@v2"

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -77,7 +82,7 @@ jobs:
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: "Perform CodeQL Analysis"
uses: "github/codeql-action/analyze@v2"
with:
category: "/language:${{matrix.language}}"
12 changes: 10 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

# file-version: 1.0

name: "Continuous Integration"

on:
Expand Down Expand Up @@ -34,7 +36,9 @@ jobs:
name: "Check composer dependencies"

runs-on: "${{ matrix.operating-system }}"

timeout-minutes: 10

continue-on-error: false

needs: "ci"
Expand Down Expand Up @@ -88,7 +92,9 @@ jobs:
needs: "ci"

runs-on: "${{ matrix.operating-system }}"

timeout-minutes: 10

continue-on-error: false

strategy:
Expand Down Expand Up @@ -135,15 +141,17 @@ jobs:
composer-options: "--optimize-autoloader --prefer-dist --prefer-stable -v"

- name: "Run unit tests with phpunit/phpunit"
run: "vendor/bin/phpunit -c phpunit.xml --no-coverage"
run: "vendor/bin/phpunit -c phpunit.xml --no-coverage --display-warnings --display-deprecations"

code-coverage:
name: "Code Coverage with PHPUnit"

needs: "tests"

runs-on: "${{ matrix.operating-system }}"

timeout-minutes: 10

continue-on-error: false

strategy:
Expand Down Expand Up @@ -192,7 +200,7 @@ jobs:
run: "mkdir -p .build/coverage"

- name: "Collect code coverage with Xdebug and phpunit/phpunit"
run: "vendor/bin/phpunit -c phpunit.xml --coverage-clover=.build/coverage/clover.xml --coverage-text --coverage-xml=.build/coverage/coverage-xml --log-junit=.build/coverage/phpunit.junit.xml"
run: "vendor/bin/phpunit -c phpunit.xml --coverage-clover=.build/coverage/clover.xml --coverage-text --coverage-xml=.build/coverage/coverage-xml --log-junit=.build/coverage/phpunit.junit.xml --display-warnings --display-deprecations"

- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v3.1.4"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement

# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

# file-version: 1.0

name: "Dependency Review"

on:
Expand Down
Loading

0 comments on commit 34839ef

Please sign in to comment.