From b618391bc984e1a326e1430a22ddfa84544b847f Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Mon, 3 Jun 2024 13:27:43 +0300 Subject: [PATCH] Added GitHub settings --- .github/ISSUE_TEMPLATE/bug_report.yml | 50 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 +++ .github/ISSUE_TEMPLATE/feature_request.yml | 19 ++++++++ .github/PULL_REQUEST_TEMPLATE.md | 5 +++ .github/dependabot.yml | 9 ++++ .github/workflows/code-style.yml | 26 +++++++++++ .github/workflows/phpunit.yml | 32 ++++++++++++++ .github/workflows/release-drafter.yml | 11 +++++ 8 files changed, 157 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/code-style.yml create mode 100644 .github/workflows/phpunit.yml create mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..642ab63 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,50 @@ +name: Bug Report +description: Report a bug or other issue + +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + + ⚠️Review existing issues to see whether someone else has already reported your issue. + + - type: textarea + id: environment + attributes: + label: Environment + description: | + Tip: Use the `composer info dragon-code/laravel-http-user-agent` command to get information for Laravel Lang. + Tip: Use the `php artisan --version` command to get information for Laravel Framework. + Tip: Use the `php -v` command to get information for PHP. + value: | + - PHP Version: + - HTTP User Agent Version: + - Laravel Version: + validations: + required: true + + - type: textarea + id: description + attributes: + label: Issue description + description: | + Be as specific and detailed as possible to help us triaging your issue. Screenshots and/or animations can be very useful in helping to understand the issue you're facing. + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + Tip: You can use https://www.screentogif.com to record animations and videos. + validations: + required: true + + - type: textarea + id: steps + attributes: + label: Steps to reproduce + description: Take some time to try and reproduce the issue, then explain how to do so here. + validations: + required: true + + - type: markdown + attributes: + value: | + ❤️ The Dragon Code? Please consider supporting our collective on [Boosty](https://boosty.to/dragon-code). diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..6b5c4be --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Laravel issue + url: https://github.com/laravel/framework/issues + about: 'If you have a question about your Laravel implementation, ask it in your Laravel project.' diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..d581830 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,19 @@ +name: Feature Proposal +description: Propose a new feature + +body: + - type: textarea + id: description + attributes: + label: Feature description + description: | + Think through your proposal and describe it clearly. + + Note that features are only added to the most recent version of Laravel Lang. + validations: + required: true + + - type: markdown + attributes: + value: | + ❤️ The Dragon Code? Please consider supporting our collective on [Boosty](https://boosty.to/dragon-code). diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..8efa1cb --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,5 @@ + diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..16e2975 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +version: 2 +updates: + - + package-ecosystem: github-actions + directory: / + schedule: + interval: daily + labels: + - dependabot diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml new file mode 100644 index 0000000..a148c44 --- /dev/null +++ b/.github/workflows/code-style.yml @@ -0,0 +1,26 @@ +name: Code Style + +on: [ push, pull_request ] + +permissions: write-all + +jobs: + style: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Detect job name + id: detect + run: | + [[ ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} ]] && NAME="Fix" || NAME="Check" + + echo "name=${NAME}" >> $GITHUB_OUTPUT + + - name: ${{ steps.detect.outputs.name }} the code style + uses: TheDragonCode/codestyler@v4 + with: + github_token: ${{ secrets.COMPOSER_TOKEN }} + fix: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml new file mode 100644 index 0000000..ea58fea --- /dev/null +++ b/.github/workflows/phpunit.yml @@ -0,0 +1,32 @@ +name: Tests + +on: [ push, pull_request ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + php: [ "8.2", "8.3" ] + laravel: [ "10.0", "11.0" ] + + name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv + coverage: xdebug + + - name: Install dependencies + run: composer require --dev laravel/framework:^${{ matrix.laravel }} + + - name: Execute tests + run: composer test diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..90bc79a --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,11 @@ +name: Release Drafter + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + Update: + uses: TheDragonCode/.github/.github/workflows/release-drafter.yml@main