Skip to content

Commit

Permalink
Merge pull request #1805 from tj-actions/feat/add-support-for-changin…
Browse files Browse the repository at this point in the history
…g-the-default-escaping-of-filenames

feat: add support for changing the default escaping of filenames
  • Loading branch information
repo-ranger[bot] authored Apr 29, 2024
2 parents 42e2fc5 + 42941cd commit 3ab5b47
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
**/*.tsx
extra_args: "--max-warnings=0"
ignore_patterns: "src/reportWebVitals.ts"
escape_paths: false

- name: Fix Lint Errors
if: failure()
Expand All @@ -68,6 +69,7 @@ jobs:
file_extensions: |
**/*.ts
**/*.tsx
escape_paths: false
extra_args: "--fix"
skip_annotations: true
ignore_patterns: "src/reportWebVitals.ts"
Expand Down Expand Up @@ -130,6 +132,7 @@ jobs:
file_extensions: |
**/*.ts
**/*.tsx
escape_paths: false
extra_args: "--max-warnings=0"
ignore_patterns: "src/reportWebVitals.ts"

Expand Down
9 changes: 7 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ inputs:
required: false
default: ''
ignore_patterns:
description: "[ESLint](https://eslint.org/docs/latest/use/configure/ignore) [configuration file](https://eslint.org/docs/latest/use/configure/ignore#ignoring-files) ignores key. Optionally ignore files in the `ignores` key from being passed to ESLint not required when `all_files` is set to `true`."
description: "[ESLint](https://eslint.org/docs/latest/use/configure/ignore) [configuration file](https://eslint.org/docs/latest/use/configure/ignore#ignoring-files) ignores key. Optionally ignoring files in the `ignores` key from being passed to ESLint, this input would be ignored when `all_files` is set to `true`."
required: false
default: ''
file_extensions:
Expand All @@ -39,7 +39,7 @@ inputs:
description: |
[Reporter](https://github.com/reviewdog/reviewdog#reporters) of reviewdog command
(github-check, github-pr-review).
github-pr-review can use Markdown and add a link to rule page in reviewdog reports.
github-pr-review can use Markdown and add a link to the rule page in reviewdog reports.
required: false
default: 'github-pr-review'
filter_mode:
Expand Down Expand Up @@ -67,6 +67,10 @@ inputs:
Force the use of Github's REST API even when a local copy of the repository exists
required: false
default: false
escape_paths:
description: "Escaped changed file paths passed to ESLint. NOTE: This defaults to `true` to prevent command injection."
required: false
default: "true"

runs:
using: 'composite'
Expand All @@ -86,6 +90,7 @@ runs:
diff_relative: true
skip_initial_fetch: ${{ inputs.skip_initial_fetch }}
use_rest_api: ${{ inputs.use_rest_api }}
safe_output: ${{ inputs.escape_paths }}
- name: Run eslint on changed files
run: |
# Run eslint on changed files
Expand Down
7 changes: 7 additions & 0 deletions test-app/src/(test)/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";

function Page() {
return <div className="Test"></div>;
}

export default Page;

0 comments on commit 3ab5b47

Please sign in to comment.