wearerequired / lint-action

✨ GitHub Action for detecting and auto-fixing lint errors
MIT License
555 stars 130 forks source link

Linters showing up under wrong workflow name #685

Closed mikepianka closed 11 months ago

mikepianka commented 11 months ago

I setup this action with a few linters and it is working great, but there is an odd issue I am having wear the linter result shows up under the wrong workflow name.

image

My linters are showing up under my Run Unit Tests workflow rather than the Run Linters workflow.

Those workflow files look like this:

name: Run Linters

on: pull_request

jobs:
  lint:
    runs-on: ubuntu-latest

    steps:
      # checkout the repo's branch
      - name: Checkout
        uses: actions/checkout@v3

      # install npm deps with locked versions
      - name: Install deps
        run: npm ci

      # lint and format checks
      - name: Run linters
        uses: wearerequired/lint-action@v2
        with:
          eslint: true
          eslint_args: "--max-warnings 0"
          eslint_dir: "src/"
          eslint_auto_fix: false
          eslint_extensions: "js,jsx,ts,tsx"
          prettier: true
          prettier_dir: "src/"
          prettier_auto_fix: true
          tsc: true
          tsc_args: "--noEmit"
          tsc_auto_fix: false
          git_name: "Linter Bot"
          git_email: "linterbot@example.com"
          auto_fix: true
name: Run Unit Tests

on:
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      # checkout the repo's branch
      - name: Checkout
        uses: actions/checkout@v3

      # install npm deps with locked versions
      - name: Install deps
        run: npm ci

      # run unit tests
      - name: Run unit tests
        run: npm run test
ocean90 commented 11 months ago

Hi there, this is an issue with how the GitHub checks API works. Checks are attached to commit SHAs and the annotations are added to latest workflow run for the commit being tested. This is nothing this action can fix.

Duplicate of #657, #577, #401, #280, #97, #93.