Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Dec 29, 2021
0 parents commit 8db0412
Show file tree
Hide file tree
Showing 33 changed files with 7,475 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
@@ -0,0 +1,20 @@
root = true

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

[*.json]
indent_size = 2

[*.neon]
indent_style = tab

[*.{yaml,yml}]
indent_size = 2

[Makefile]
indent_style = tab
14 changes: 14 additions & 0 deletions .gitattributes
@@ -0,0 +1,14 @@
/.github/ export-ignore
/.phive/ export-ignore
/test/ export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.php export-ignore
/.yamllint.yaml export-ignore
/composer-require-checker.json export-ignore
/composer.lock export-ignore
/infection.json export-ignore
/Makefile export-ignore
/psalm-baseline.xml export-ignore
/psalm.xml export-ignore
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
@@ -0,0 +1 @@
* @ergebnis-bot @localheinz
@@ -0,0 +1,16 @@
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-run-steps-action
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#inputs
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-composite-run-steps-actions
# https://getcomposer.org/doc/03-cli.md#composer-cache-dir

name: "Determine composer cache directory"

description: "Determines the composer cache directory and exports it as COMPOSER_CACHE_DIR environment variable"

runs:
using: "composite"

steps:
- name: "Determine composer cache directory"
shell: "bash"
run: "echo \"COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV"
22 changes: 22 additions & 0 deletions .github/actions/composer/composer/install/action.yaml
@@ -0,0 +1,22 @@
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-run-steps-action
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#inputs
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-composite-run-steps-actions

name: "Install dependencies with composer"

description: "Installs dependencies with composer"

inputs:
dependencies:
description: "Which dependencies to install, one of \"lowest\", \"locked\", \"highest\""
required: true

runs:
using: "composite"

steps:
- name: "Install ${{ inputs.dependencies }} dependencies with composer"
shell: "bash"
run: "${{ github.action_path }}/run.sh"
env:
COMPOSER_INSTALL_DEPENDENCIES: "${{ inputs.dependencies }}"
25 changes: 25 additions & 0 deletions .github/actions/composer/composer/install/run.sh
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

dependencies="${COMPOSER_INSTALL_DEPENDENCIES}"

if [[ ${dependencies} == "lowest" ]]; then
composer update --ansi --no-interaction --no-progress --prefer-lowest

exit $?
fi

if [[ ${dependencies} == "locked" ]]; then
composer install --ansi --no-interaction --no-progress

exit $?
fi

if [[ ${dependencies} == "highest" ]]; then
composer update --ansi --no-interaction --no-progress

exit $?
fi

echo "::error::The value for the \"dependencies\" input needs to be one of \"lowest\", \"locked\", \"highest\" - got \"${dependencies}\" instead."

exit 1
27 changes: 27 additions & 0 deletions .github/dependabot.yaml
@@ -0,0 +1,27 @@
# https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2

updates:
- commit-message:
include: "scope"
prefix: "composer"
directory: "/"
labels:
- "dependency"
open-pull-requests-limit: 10
package-ecosystem: "composer"
schedule:
interval: "daily"
versioning-strategy: "increase"

- commit-message:
include: "scope"
prefix: "github-actions"
directory: "/"
labels:
- "dependency"
open-pull-requests-limit: 10
package-ecosystem: "github-actions"
schedule:
interval: "daily"
94 changes: 94 additions & 0 deletions .github/settings.yml
@@ -0,0 +1,94 @@
# https://github.com/probot/settings

branches:
- name: "main"

# https://docs.github.com/en/rest/reference/repos#delete-branch-protection
# https://docs.github.com/en/rest/reference/repos#update-branch-protection

protection:
enforce_admins: false
required_pull_request_reviews:
dismiss_stale_reviews: true
require_code_owner_reviews: true
required_approving_review_count: 1
required_status_checks:
contexts:
- "Code Coverage (7.4, locked)"
- "Coding Standards (7.4, locked)"
- "Dependency Analysis (7.4, locked)"
- "Mutation Tests (7.4, locked)"
- "Static Code Analysis (7.4, locked)"
- "Tests (7.4, highest)"
- "Tests (7.4, locked)"
- "Tests (7.4, lowest)"
- "Tests (8.0, highest)"
- "Tests (8.0, locked)"
- "Tests (8.0, lowest)"
- "Tests (8.1, highest)"
- "Tests (8.1, locked)"
- "Tests (8.1, lowest)"
strict: false
restrictions:

# https://docs.github.com/en/rest/reference/repos#list-branches--parameters

# Note: User, app, and team restrictions are only available for organization-owned repositories.
# Set to null to disable when using this configuration for a repository on a personal account.

apps: []
teams: []
users:
- "ergebnis-bot"

# https://docs.github.com/en/rest/reference/issues#create-a-label
# https://docs.github.com/en/rest/reference/issues#update-a-label

labels:
- name: "bug"
color: "ee0701"
description: ""

- name: "dependency"
color: "0366d6"
description: ""

- name: "enhancement"
color: "0e8a16"
description: ""

- name: "question"
color: "cc317c"
description: ""

- name: "security"
color: "ee0701"
description: ""

- name: "stale"
color: "eeeeee"
description: ""

# https://docs.github.com/en/rest/reference/repos#update-a-repository

repository:
allow_merge_commit: true
allow_rebase_merge: false
allow_squash_merge: false
archived: false
default_branch: "main"
delete_branch_on_merge: true
description: ":page_with_curl: Provides a console command for normalizing JSON documents."
enable_automated_security_fixes: true
enable_vulnerability_alerts: true
has_downloads: true
has_issues: true
has_pages: false
has_projects: false
has_wiki: false
name: "json-normalize"
private: false

# https://docs.github.com/en/rest/reference/repos#replace-all-repository-topics

topics: "json, normalize"

0 comments on commit 8db0412

Please sign in to comment.