diff --git a/.github/super-linter.env b/.github/super-linter.env index 62713a336..44ef4cb23 100644 --- a/.github/super-linter.env +++ b/.github/super-linter.env @@ -1,8 +1,8 @@ +FIX_MARKDOWN=true IGNORE_GITIGNORED_FILES=true MARKDOWN_CONFIG_FILE=.markdownlint.yml VALIDATE_ALL_CODEBASE=false VALIDATE_GIT_MERGE_CONFLICT_MARKERS=true VALIDATE_GITHUB_ACTIONS=true -VALIDATE_JSON=true VALIDATE_MARKDOWN=true VALIDATE_YAML=true diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 9b631cf27..e6403b4fe 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -6,6 +6,7 @@ permissions: contents: read statuses: write + pull-requests: write jobs: testing: diff --git a/.github/workflows/validate-pr_job.yml b/.github/workflows/validate-pr_job.yml index 6f82a5ea3..e68ff3df5 100644 --- a/.github/workflows/validate-pr_job.yml +++ b/.github/workflows/validate-pr_job.yml @@ -3,26 +3,49 @@ name: Reusable workflow to validate a pull request on: workflow_call -permissions: - contents: read - statuses: write - jobs: lint-test: runs-on: ubuntu-latest steps: - - name: Checkout Code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Load super-linter configuration - run: cat .github/super-linter.env >> "$GITHUB_ENV" - - - name: Lint Code Base - uses: super-linter/super-linter/slim@v7.2.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup reviewdog + uses: reviewdog/action-setup@v1.3.0 + with: + reviewdog_version: v0.20.3 + + - name: Load super-linter configuration + shell: bash + run: cat .github/super-linter.env >> "$GITHUB_ENV" + + - name: Lint Code Base with super-linter and reviewdog + uses: super-linter/super-linter/slim@v7.3.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Report linting results with reviewdog + shell: bash + run: | + TMPFILE=$(mktemp) + git diff > "${TMPFILE}" + if [ ! -s "${TMPFILE}" ]; then + echo "No changes detected, skipping reviewdog." + exit 0 + fi + git stash --include-untracked + reviewdog \ + -f=diff \ + -f.diff.strip=1 \ + -reporter="github-pr-review" \ + -filter-mode="diff_context" \ + -fail-level=error < "${TMPFILE}" + git stash drop || true + env: + REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} remark-test: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 658b80331..f59620d4e 100644 --- a/.gitignore +++ b/.gitignore @@ -45,4 +45,11 @@ local-test.yml .yalc yalc.lock -tmp/ \ No newline at end of file +tmp/ + +# Super-linter outputs +super-linter-output +super-linter.log + +# GitHub Actions leftovers +github_conf diff --git a/src/pages/index.md b/src/pages/index.md index 2e2171ea0..bae0a48c7 100644 --- a/src/pages/index.md +++ b/src/pages/index.md @@ -10,15 +10,14 @@ keywords: ![Commerce PHP Extensions](_images/home-bg.jpeg) # Commerce PHP Extensions - -Learn how to create and maintain PHP extensions for Adobe Commerce and Magento Open Source. +Learn how to create and maintain PHP extensions for Adobe Commerce and Magento Open Source. ## Resources * [Commerce open-source projects](https://developer.adobe.com/open/magento) -* [Community Slack workspace](https://opensource.magento.com/slack) +- [Community Slack workspace](https://opensource.magento.com/slack) * [Contributor statistics](https://developer.adobe.com/open/magento/statistic) ## Overview