Skip to content

Commit

Permalink
Enhancement: Synchronize with ergebnis/php-cs-fixer-config-template
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Jan 2, 2020
1 parent a8951fa commit 2c1873f
Show file tree
Hide file tree
Showing 18 changed files with 909 additions and 172 deletions.
8 changes: 7 additions & 1 deletion .dependabot/config.yml
Expand Up @@ -3,7 +3,13 @@
version: 1

update_configs:
- default_assignees:
- automerged_updates:
- match:
dependency_type: "development"
commit_message:
include_scope: true
prefix: "Build"
default_assignees:
- "localheinz"
default_labels:
- "dependency"
Expand Down
23 changes: 13 additions & 10 deletions .gitattributes
@@ -1,10 +1,13 @@
/.dependabot/ export-ignore
/.github/ export-ignore
/test/ export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs export-ignore
/infection.json export-ignore
/Makefile export-ignore
/phpstan.neon export-ignore
/.dependabot/ export-ignore
/.github/ export-ignore
/test/ export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs export-ignore
/infection.json export-ignore
/Makefile export-ignore
/phpstan-baseline.neon export-ignore
/phpstan.neon export-ignore
/psalm-baseline.xml export-ignore
/psalm.xml export-ignore
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Expand Up @@ -30,7 +30,7 @@ to run a dependency analysis.

## Static Code Analysis

We are using [`phpstan/phpstan`](https://github.com/phpstan/phpstan) to statically analyze the code.
We are using [`phpstan/phpstan`](https://github.com/phpstan/phpstan) and [`vimeo/psalm`](https://github.com/vimeo/psalm) to statically analyze the code.

Run

Expand All @@ -40,17 +40,17 @@ $ make static-code-analysis

to run a static code analysis.

We are also using the [baseline feature](https://medium.com/@ondrejmirtes/phpstans-baseline-feature-lets-you-hold-new-code-to-a-higher-standard-e77d815a5dff) of [`phpstan/phpstan`](https://github.com/phpstan/phpstan).
We are also using the baseline features of [`phpstan/phpstan`(https://medium.com/@ondrejmirtes/phpstans-baseline-feature-lets-you-hold-new-code-to-a-higher-standard-e77d815a5dff) and [`vimeo/psalm`](https://psalm.dev/docs/running_psalm/dealing_with_code_issues/#using-a-baseline-file).

Run

```
$ make static-code-analysis-baseline
```

to regenerate the baseline in [`../phpstan-baseline.neon`](../phpstan-baseline.neon).
to regenerate the baselines in [`../phpstan-baseline.neon`](../phpstan-baseline.neon) and [`../psalm-baseline.xml`](../psalm-baseline.xml).

:exclamation: Ideally, the baseline should shrink over time.
:exclamation: Ideally, the baselines should shrink over time.

## Tests

Expand Down
53 changes: 38 additions & 15 deletions .github/settings.yml
@@ -1,7 +1,11 @@
# https://github.com/probot/settings

branches:
- name: master
- name: "master"

# https://developer.github.com/v3/repos/branches/#remove-branch-protection
# https://developer.github.com/v3/repos/branches/#update-branch-protection

protection:
enforce_admins: false
required_pull_request_reviews:
Expand Down Expand Up @@ -30,26 +34,41 @@ branches:
- "codecov/patch"
- "codecov/project"
strict: false
restrictions: null
restrictions:
apps:
- "dependabot-preview"
teams: []
users: []

# https://developer.github.com/v3/issues/labels/#create-a-label
# https://developer.github.com/v3/issues/labels/#update-a-label

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

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

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

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

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

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

# https://developer.github.com/v3/repos/#edit

repository:
allow_merge_commit: true
Expand All @@ -62,5 +81,9 @@ repository:
has_pages: false
has_projects: false
has_wiki: false
name: php-cs-fixer-config
name: "php-cs-fixer-config"
private: false

# https://developer.github.com/v3/repos/branches/#remove-branch-protection

topics: "php-cs-fixer, configuration"
19 changes: 19 additions & 0 deletions .github/workflows/approve.yml
@@ -0,0 +1,19 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Approve"

on:
- "pull_request"

jobs:
approve:
name: "Approve"

runs-on: "ubuntu-latest"

steps:
- name: "Approve"
uses: "hmarr/auto-approve-action@v2.0.0"
if: "(github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]') && startsWith(github.event.pull_request.title, 'Build(deps-dev)')"
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
29 changes: 29 additions & 0 deletions .github/workflows/continuous-deployment.yml
@@ -0,0 +1,29 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Continuous Deployment"

on:
push:
tags:
- "**"

jobs:
release:
name: "Release"

runs-on: "ubuntu-latest"

steps:
- name: "Determine tag"
id: "determine-tag"
run: "echo \"::set-output name=tag::${GITHUB_REF#refs/tags/}\""

- name: "Create release"
uses: "actions/create-release@v1.0.0"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
draft: false
prerelease: false
release_name: "${{ steps.determine-tag.outputs.tag }}"
tag_name: "${{ steps.determine-tag.outputs.tag }}"

0 comments on commit 2c1873f

Please sign in to comment.