Skip to content

Commit

Permalink
Merge pull request #15 from ergebnis/feature/synchronize
Browse files Browse the repository at this point in the history
Enhancement: Synchronize with ergebnis/php-library-template
  • Loading branch information
ergebnis-bot committed Jan 2, 2021
2 parents 6194568 + 4cc8983 commit b319bdb
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 36 deletions.
8 changes: 4 additions & 4 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ branches:
required_approving_review_count: 1
required_status_checks:
contexts:
- "Code Coverage (8.0, locked)"
- "Code Coverage (7.3, locked)"
- "Coding Standards (7.3, locked)"
- "Dependency Analysis (7.4, locked)"
- "Mutation Tests (8.0, locked)"
- "Static Code Analysis (8.0, locked)"
- "Dependency Analysis (7.3, locked)"
- "Mutation Tests (7.3, locked)"
- "Static Code Analysis (7.3, locked)"
- "Tests (7.3, highest)"
- "Tests (7.3, locked)"
- "Tests (7.3, lowest)"
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on: # yamllint disable-line rule:truthy
- "main"

env:
ERGEBNIS_BOT_NAME: "ergebnis-bot"
PHP_EXTENSIONS: "mbstring"

jobs:
Expand Down Expand Up @@ -86,7 +85,7 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "7.3"

dependencies:
- "locked"
Expand Down Expand Up @@ -128,7 +127,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.0"
- "7.3"

dependencies:
- "locked"
Expand Down Expand Up @@ -248,7 +247,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.0"
- "7.3"

dependencies:
- "locked"
Expand Down Expand Up @@ -298,7 +297,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.0"
- "7.3"

dependencies:
- "locked"
Expand Down Expand Up @@ -354,12 +353,11 @@ jobs:
) && (
(github.actor == 'dependabot[bot]' && startsWith(github.event.pull_request.title, 'composer(deps-dev)')) ||
(github.actor == 'dependabot[bot]' && startsWith(github.event.pull_request.title, 'github-actions(deps)')) ||
(github.actor == 'ergebnis-bot' && github.event.pull_request.title == 'Enhancement: Update license year') ||
(github.actor == 'localheinz' && contains(github.event.pull_request.labels.*.name, 'merge'))
)
steps:
- name: "Request review from @${{ env.ERGEBNIS_BOT_NAME }}"
- name: "Request review from @ergebnis-bot"
uses: "actions/github-script@v3.1"
with:
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
Expand All @@ -368,7 +366,7 @@ jobs:
const repository = context.repo
const reviewers = [
"${{ env.ERGEBNIS_BOT_NAME }}",
"ergebnis-bot",
]
await github.pulls.requestReviewers({
Expand All @@ -378,7 +376,7 @@ jobs:
reviewers: reviewers,
})
- name: "Assign @${{ env.ERGEBNIS_BOT_NAME }}"
- name: "Assign @ergebnis-bot"
uses: "actions/github-script@v3.1"
with:
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
Expand All @@ -387,7 +385,7 @@ jobs:
const repository = context.repo
const assignees = [
"${{ env.ERGEBNIS_BOT_NAME }}",
"ergebnis-bot",
]
await github.issues.addAssignees({
Expand All @@ -399,7 +397,6 @@ jobs:
- name: "Approve pull request"
uses: "actions/github-script@v3.1"
if: "github.actor != '${{ env.ERGEBNIS_BOT_NAME }}'"
with:
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
script: |
Expand Down
27 changes: 10 additions & 17 deletions .github/workflows/renew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ name: "Renew"

on: # yamllint disable-line rule:truthy
schedule:
- cron: "1 0 1 1 *"
- cron: "0 0 1 1 *"

env:
ERGEBNIS_BOT_EMAIL: "bot@ergebn.is"
ERGEBNIS_BOT_NAME: "ergebnis-bot"
PHP_EXTENSIONS: "mbstring"

jobs:
Expand All @@ -28,6 +26,8 @@ jobs:
steps:
- name: "Checkout"
uses: "actions/checkout@v2.3.4"
with:
token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"

- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@2.9.0"
Expand Down Expand Up @@ -65,19 +65,12 @@ jobs:
restore-keys: "php-${{ matrix.php-version }}-php-cs-fixer-"

- name: "Run friendsofphp/php-cs-fixer"
run: "vendor/bin/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --dry-run --verbose"
run: "vendor/bin/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --verbose"

- name: "Open pull request updating license year"
uses: "gr2m/create-or-update-pull-request-action@v1.3.3"
- name: "Commit modified files"
uses: "stefanzweifel/git-auto-commit-action@v4.8.0"
with:
author: "${{ env.ERGEBNIS_BOT_NAME }} <${{ env.ERGEBNIS_BOT_EMAIL }}>"
branch: "feature/license-year"
body: |
This PR
* [x] updates the license year
commit-message: "Enhancement: Update license year"
path: "."
title: "Enhancement: Update license year"
env:
GITHUB_TOKEN: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
commit_author: "ergebnis-bot <bot@ergebn.is>"
commit_message: "Enhancement: Update license year"
commit_user_email: "bot@ergebn.is"
commit_user_name: "ergebnis-bot"
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# front-matter

[![Integrate](https://github.com/ergebnis/front-matter/workflows/Integrate/badge.svg?branch=main)](https://github.com/ergebnis/front-matter/actions)
[![Prune](https://github.com/ergebnis/front-matter/workflows/Prune/badge.svg?branch=main)](https://github.com/ergebnis/front-matter/actions)
[![Release](https://github.com/ergebnis/front-matter/workflows/Release/badge.svg?branch=main)](https://github.com/ergebnis/front-matter/actions)
[![Renew](https://github.com/ergebnis/front-matter/workflows/Renew/badge.svg?branch=main)](https://github.com/ergebnis/front-matter/actions)
[![Integrate](https://github.com/ergebnis/front-matter/workflows/Integrate/badge.svg)](https://github.com/ergebnis/front-matter/actions)
[![Prune](https://github.com/ergebnis/front-matter/workflows/Prune/badge.svg)](https://github.com/ergebnis/front-matter/actions)
[![Release](https://github.com/ergebnis/front-matter/workflows/Release/badge.svg)](https://github.com/ergebnis/front-matter/actions)
[![Renew](https://github.com/ergebnis/front-matter/workflows/Renew/badge.svg)](https://github.com/ergebnis/front-matter/actions)

[![Code Coverage](https://codecov.io/gh/ergebnis/front-matter/branch/main/graph/badge.svg)](https://codecov.io/gh/ergebnis/front-matter)
[![Type Coverage](https://shepherd.dev/github/ergebnis/front-matter/coverage.svg)](https://shepherd.dev/github/ergebnis/front-matter)
Expand Down

0 comments on commit b319bdb

Please sign in to comment.