Skip to content

Commit

Permalink
Merge pull request #68 from ataylorme/release/v2.2.0
Browse files Browse the repository at this point in the history
- #66 Add support for multiple reports via glob patterns
  - props @mskelton
- #65 Add report markdown to job summary
  - props @velocibear
  • Loading branch information
ataylorme authored Aug 22, 2023
2 parents 2c426a3 + c121584 commit 5f4dc2e
Show file tree
Hide file tree
Showing 10 changed files with 6,333 additions and 3,728 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ESLint Annotate from Report JSON

## Version `2.1.1`
## Version `2.2.0`

## Description

Expand All @@ -24,8 +24,8 @@ This allows for more flexibility on how ESLint is run. This action is agnostic e

| Name | Description | Required | Default Value |
|---|---|---|---|
| `repo-token` | The [`GITHUB_TOKEN` secret](https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#about-the-github_token-secret) | **Yes** | N/A |
| `report-json` | The path to the ESLint report JSON file | No | `eslint_report.json` |
| `repo-token` | The [`GITHUB_TOKEN` secret](https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#about-the-github_token-secret) | No | `${{ github.token }}` |
| `report-json` | Path or [glob pattern](https://github.com/actions/toolkit/tree/master/packages/glob) to locate the ESLint report JSON file. Use multiple lines to specify multiple glob patterns. | No | `eslint_report.json` |
| `only-pr-files` | Only annotate files changed when run on the `pull_request` event | No | `true` |
| `fail-on-warning` | Fail the GitHub Action when ESLint warnings are detected. Set to `true` to enable. | No | `false` |
| `fail-on-error` | Whether to fail the Github action when ESLint errors are detected. If set to false, the check that is created will still fail on ESLint errors. | No | `true` |
Expand Down Expand Up @@ -76,7 +76,6 @@ jobs:
- name: Annotate Code Linting Results
uses: ataylorme/eslint-annotate-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
report-json: "eslint_report.json"
# OPTIONAL: save a copy of the usage report for download or use in another job
# - name: Upload ESLint report
Expand All @@ -85,3 +84,4 @@ jobs:
# name: eslint_report.json
# path: eslint_report.json
# retention-days: 5
```
7 changes: 4 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ name: "ESLint Annotate from Report JSON"
description: "Annotates pull request diffs with warnings and errors from an ESLint report JSON file."
inputs:
repo-token:
description: "Token used to interact with the Github API."
description: "The 'GITHUB_TOKEN' secret"
default: ${{ github.token }}
required: true
report-json:
description: "ESLint report file in JSON format."
description: "Path or glob pattern to locate the ESLint report JSON file"
default: "eslint_report.json"
required: false
only-pr-files:
description: "Only annotate files changed when run on pull requests"
description: "Only annotate files changed when run on the 'pull_request' event"
default: 'true'
required: false
fail-on-warning:
Expand Down
Loading

0 comments on commit 5f4dc2e

Please sign in to comment.