diff --git a/.github/settings.yml b/.github/settings.yml index c5659b86..433db674 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -14,11 +14,11 @@ branches: required_approving_review_count: 1 required_status_checks: contexts: - - "Code Coverage (7.4, locked)" + - "Code Coverage (7.2, locked)" - "Coding Standards (7.2, locked)" - - "Dependency Analysis (7.4, locked)" - - "Mutation Tests (7.4, locked)" - - "Static Code Analysis (7.4, locked)" + - "Dependency Analysis (7.2, locked)" + - "Mutation Tests (7.2, locked)" + - "Static Code Analysis (7.2, locked)" - "Tests (7.2, highest)" - "Tests (7.2, locked)" - "Tests (7.2, lowest)" diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index 1c0fcfcc..338d1a26 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -9,7 +9,6 @@ on: # yamllint disable-line rule:truthy - "main" env: - ERGEBNIS_BOT_NAME: "ergebnis-bot" MIN_COVERED_MSI: 92 MIN_MSI: 90 PHP_EXTENSIONS: "mbstring" @@ -91,7 +90,7 @@ jobs: strategy: matrix: php-version: - - "7.4" + - "7.2" dependencies: - "locked" @@ -133,7 +132,7 @@ jobs: strategy: matrix: php-version: - - "7.4" + - "7.2" dependencies: - "locked" @@ -254,7 +253,7 @@ jobs: strategy: matrix: php-version: - - "7.4" + - "7.2" dependencies: - "locked" @@ -304,7 +303,7 @@ jobs: strategy: matrix: php-version: - - "7.4" + - "7.2" dependencies: - "locked" @@ -360,12 +359,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 }}" @@ -374,7 +372,7 @@ jobs: const repository = context.repo const reviewers = [ - "${{ env.ERGEBNIS_BOT_NAME }}", + "ergebnis-bot", ] await github.pulls.requestReviewers({ @@ -384,7 +382,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 }}" @@ -393,7 +391,7 @@ jobs: const repository = context.repo const assignees = [ - "${{ env.ERGEBNIS_BOT_NAME }}", + "ergebnis-bot", ] await github.issues.addAssignees({ @@ -405,7 +403,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: | diff --git a/.github/workflows/renew.yaml b/.github/workflows/renew.yaml index 6cb295f1..f28d005e 100644 --- a/.github/workflows/renew.yaml +++ b/.github/workflows/renew.yaml @@ -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: @@ -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" @@ -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 " + commit_message: "Enhancement: Update license year" + commit_user_email: "bot@ergebn.is" + commit_user_name: "ergebnis-bot" diff --git a/README.md b/README.md index 583489c7..2b3bd127 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # test-util -[![Integrate](https://github.com/ergebnis/test-util/workflows/Integrate/badge.svg?branch=main)](https://github.com/ergebnis/test-util/actions) -[![Prune](https://github.com/ergebnis/test-util/workflows/Prune/badge.svg?branch=main)](https://github.com/ergebnis/test-util/actions) -[![Release](https://github.com/ergebnis/test-util/workflows/Release/badge.svg?branch=main)](https://github.com/ergebnis/test-util/actions) -[![Renew](https://github.com/ergebnis/test-util/workflows/Renew/badge.svg?branch=main)](https://github.com/ergebnis/test-util/actions) +[![Integrate](https://github.com/ergebnis/test-util/workflows/Integrate/badge.svg)](https://github.com/ergebnis/test-util/actions) +[![Prune](https://github.com/ergebnis/test-util/workflows/Prune/badge.svg)](https://github.com/ergebnis/test-util/actions) +[![Release](https://github.com/ergebnis/test-util/workflows/Release/badge.svg)](https://github.com/ergebnis/test-util/actions) +[![Renew](https://github.com/ergebnis/test-util/workflows/Renew/badge.svg)](https://github.com/ergebnis/test-util/actions) [![Code Coverage](https://codecov.io/gh/ergebnis/test-util/branch/main/graph/badge.svg)](https://codecov.io/gh/ergebnis/test-util) [![Type Coverage](https://shepherd.dev/github/ergebnis/test-util/coverage.svg)](https://shepherd.dev/github/ergebnis/test-util)