From 1fe62c41005139bf353f999bbf44e18fb2b1c64b Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Fri, 30 Dec 2022 01:41:43 -0700 Subject: [PATCH] fix: bug with spacing (#397) Co-authored-by: GitHub Action --- README.md | 2 +- cmd/root.go | 3 +- test/README-inputColumns.md | 102 +++++++++++++++++------------------ test/README-outputColumns.md | 56 +++++++++---------- test/README.md | 102 +++++++++++++++++------------------ 5 files changed, 132 insertions(+), 133 deletions(-) diff --git a/README.md b/README.md index c42fbf9b..4f3dea47 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bb5dc10c1d2645c0894fa6774300639b)](https://app.codacy.com/gh/tj-actions/auto-doc?utm_source=github.com\&utm_medium=referral\&utm_content=tj-actions/auto-doc\&utm_campaign=Badge_Grade_Settings) -![Coverage](https://img.shields.io/badge/Coverage-82.4%25-brightgreen) +![Coverage](https://img.shields.io/badge/Coverage-82.2%25-brightgreen) [![Go Reference](https://pkg.go.dev/badge/github.com/tj-actions/auto-doc.svg)](https://pkg.go.dev/github.com/tj-actions/auto-doc) [![Go Report Card](https://goreportcard.com/badge/github.com/tj-actions/auto-doc)](https://goreportcard.com/report/github.com/tj-actions/auto-doc) [![CI](https://github.com/tj-actions/auto-doc/workflows/CI/badge.svg)](https://github.com/tj-actions/auto-doc/actions?query=workflow%3ACI) diff --git a/cmd/root.go b/cmd/root.go index f9858965..3f68df11 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -406,7 +406,6 @@ func wordWrap(s string, limit int) string { // compile regular expressions for Markdown links and code blocks and code linkRegex := regexp.MustCompile(`\[.*]\(.*\)`) codeBlockRegex := regexp.MustCompile(`\` + "```" + `.*` + "```" + `\s*`) - codeRegex := regexp.MustCompile("`.*`") // convert string to slice strSlice := strings.Fields(s) @@ -427,7 +426,7 @@ func wordWrap(s string, limit int) string { if len(strSlice) < currentLimit { currentLimit = len(strSlice) result = result + strings.Join(strSlice[:currentLimit], " ") - } else if currentLimit == limit && !linkRegex.MatchString(strings.Join(strSlice[:currentLimit], " ")) && !codeBlockRegex.MatchString(strings.Join(strSlice[:currentLimit], " ")) && !codeRegex.MatchString(strings.Join(strSlice[:currentLimit], " ")) { + } else if currentLimit == limit && !linkRegex.MatchString(strings.Join(strSlice[:currentLimit], " ")) && !codeBlockRegex.MatchString(strings.Join(strSlice[:currentLimit], " ")) { result = result + strings.Join(strSlice[:currentLimit], " ") + "
" } else { result = result + strings.Join(strSlice[:currentLimit], " ") diff --git a/test/README-inputColumns.md b/test/README-inputColumns.md index ce346fbf..95510993 100644 --- a/test/README-inputColumns.md +++ b/test/README-inputColumns.md @@ -4,34 +4,34 @@ -| INPUT | TYPE | DESCRIPTION | -|-----------------------------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| base_sha | string | Specify a different base commit SHA
used for comparing changes | -| diff_relative | string | Exclude changes outside the current directory
and show path names relative to
it. **NOTE:** This requires you to
specify the top level directory via
the `path` input. | -| dir_names | string | Output unique changed directories instead of
filenames. **NOTE:** This returns `.` for changed files located in the root
of the project. | -| dir_names_max_depth | string | Maximum depth of directories to output.
e.g `test/test1/test2` with max depth of`2` returns `test/test1`. | -| fetch_depth | string | Depth of additional branch history fetched.
**NOTE**: This can be adjusted to
resolve errors with insufficient history. | -| files | string | File and directory patterns to detect
changes using only these list of
file(s) (Defaults to the entire repo)
**NOTE:** Multiline file/directory patterns should not
include quotes. | -| files_from_source_file | string | Source file(s) used to populate the
`files` input. | -| files_ignore | string | Ignore changes to these file(s) **NOTE:**
Multiline file/directory patterns should not include
quotes. | -| files_ignore_from_source_file | string | Source file(s) used to populate the
`files_ignore` input | -| files_ignore_separator | string | Separator used to split the `files_ignore`input | -| files_separator | string | Separator used to split the `files`input | -| include_all_old_new_renamed_files | string | Include `all_old_new_renamed_files` output. Note this cangenerate a large output See: [#501](https://github.com/tj-actions/changed-files/issues/501). | -| json | string | Output list of changed files in
a JSON formatted string which can
be used for matrix jobs. | -| json_raw_format | string | Output list of changed files in
a raw format which means that
the output will not be surrounded
by quotes and special characters will
not be escaped. | -| match_directories | string | Indicates whether to include match directories
| -| old_new_files_separator | string | Split character for old and new
renamed filename pairs. | -| old_new_separator | string | Split character for old and new
filename pairs. | -| output_dir | string | Directory to store output files. | -| path | string | Specify a relative path under `$GITHUB_WORKSPACE`to locate the repository. | -| quotepath | string | Use non ascii characters to match
files and output the filenames completely
verbatim by setting this to `false` | -| separator | string | Split character for output strings | -| sha | string | Specify a different commit SHA used
for comparing changes | -| since | string | Get changed files for commits whose
timestamp is older than the given
time. | -| since_last_remote_commit | string | Use the last commit on the
remote branch as the `base_sha`. Defaults to the last non merge commit
on the target branch for pull
request events and the previous remote
commit of the current branch for
push events. | -| until | string | Get changed files for commits whose
timestamp is earlier than the given
time. | -| write_output_files | string | Write outputs to files in the
`.github/outputs` folder by default. | +| INPUT | TYPE | DESCRIPTION | +|-----------------------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| base_sha | string | Specify a different base commit SHA
used for comparing changes | +| diff_relative | string | Exclude changes outside the current directory
and show path names relative to
it. **NOTE:** This requires you to
specify the top level directory via
the `path` input. | +| dir_names | string | Output unique changed directories instead of
filenames. **NOTE:** This returns `.` for
changed files located in the root
of the project. | +| dir_names_max_depth | string | Maximum depth of directories to output.
e.g `test/test1/test2` with max depth of
`2` returns `test/test1`. | +| fetch_depth | string | Depth of additional branch history fetched.
**NOTE**: This can be adjusted to
resolve errors with insufficient history. | +| files | string | File and directory patterns to detect
changes using only these list of
file(s) (Defaults to the entire repo)
**NOTE:** Multiline file/directory patterns should not
include quotes. | +| files_from_source_file | string | Source file(s) used to populate the
`files` input. | +| files_ignore | string | Ignore changes to these file(s) **NOTE:**
Multiline file/directory patterns should not include
quotes. | +| files_ignore_from_source_file | string | Source file(s) used to populate the
`files_ignore` input | +| files_ignore_separator | string | Separator used to split the `files_ignore`
input | +| files_separator | string | Separator used to split the `files`
input | +| include_all_old_new_renamed_files | string | Include `all_old_new_renamed_files` output. Note this can
generate a large output See: [#501](https://github.com/tj-actions/changed-files/issues/501). | +| json | string | Output list of changed files in
a JSON formatted string which can
be used for matrix jobs. | +| json_raw_format | string | Output list of changed files in
a raw format which means that
the output will not be surrounded
by quotes and special characters will
not be escaped. | +| match_directories | string | Indicates whether to include match directories
| +| old_new_files_separator | string | Split character for old and new
renamed filename pairs. | +| old_new_separator | string | Split character for old and new
filename pairs. | +| output_dir | string | Directory to store output files. | +| path | string | Specify a relative path under `$GITHUB_WORKSPACE`
to locate the repository. | +| quotepath | string | Use non ascii characters to match
files and output the filenames completely
verbatim by setting this to `false`
| +| separator | string | Split character for output strings | +| sha | string | Specify a different commit SHA used
for comparing changes | +| since | string | Get changed files for commits whose
timestamp is older than the given
time. | +| since_last_remote_commit | string | Use the last commit on the
remote branch as the `base_sha`. Defaults
to the last non merge commit
on the target branch for pull
request events and the previous remote
commit of the current branch for
push events. | +| until | string | Get changed files for commits whose
timestamp is earlier than the given
time. | +| write_output_files | string | Write outputs to files in the
`.github/outputs` folder by default. | @@ -39,28 +39,28 @@ -| OUTPUT | TYPE | DESCRIPTION | -|--------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| added_files | string | Returns only files that are Added
(A). | -| all_changed_and_modified_files | string | Returns all changed and modified files
i.e. *a combination of (ACMRDTUX)* | -| all_changed_files | string | Returns all changed files i.e. *a
combination of all added, copied, modified
and renamed files (ACMR)* | -| all_modified_files | string | Returns all changed files i.e. *a
combination of all added, copied, modified,
renamed and deleted files (ACMRD)*. | -| all_old_new_renamed_files | string | Returns only files that are Renamed
and list their old and new
names. **NOTE:** This requires setting `include_all_old_new_renamed_files`to `true` (R) | -| any_changed | string | Returns `true` when any of the filenames provided using the `files` input has changed. If no `files` have been specified,an empty string `''` is returned. i.e. *using a combination of
all added, copied, modified and renamed
files (ACMR)*. | -| any_deleted | string | Returns `true` when any of the filenames provided using the `files` input has been deleted. If no `files` have been specified,an empty string `''`is returned. (D) | -| any_modified | string | Returns `true` when any of the filenames provided using the `files` input has been modified. If no `files` have been specified,an empty string `''` is returned. i.e. *using a combination
of all added, copied, modified, renamed,
and deleted files (ACMRD)*. | -| copied_files | string | Returns only files that are Copied
(C). | -| deleted_files | string | Returns only files that are Deleted
(D). | -| modified_files | string | Returns only files that are Modified
(M). | -| only_changed | string | Returns `true` when only files provided using the `files` input has changed. If no `files` have been specified,an empty string `''` is returned. i.e. *using a combination of all added,
copied, modified and renamed files (ACMR)*.
| -| only_deleted | string | Returns `true` when only files provided using the `files` input has been deleted. If no `files` have been specified,an empty string `''` is returned.(D) | -| only_modified | string | Returns `true` when only files provided using the `files` input has been modified. If no `files` have beenspecified,an empty string `''` is returned.(ACMRD). | -| other_changed_files | string | Returns all other changed files not
listed in the files input i.e.
*using a combination of all added,
copied, modified and renamed files (ACMR)*.
| -| other_deleted_files | string | Returns all other deleted files not
listed in the files input i.e.
*a combination of all deleted files
(D)* | -| other_modified_files | string | Returns all other modified files not
listed in the files input i.e.
*a combination of all added, copied,
modified, and deleted files (ACMRD)* | -| renamed_files | string | Returns only files that are Renamed
(R). | -| type_changed_files | string | Returns only files that have their
file type changed (T). | -| unknown_files | string | Returns only files that are Unknown
(X). | -| unmerged_files | string | Returns only files that are Unmerged
(U). | +| OUTPUT | TYPE | DESCRIPTION | +|--------------------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| added_files | string | Returns only files that are Added
(A). | +| all_changed_and_modified_files | string | Returns all changed and modified files
i.e. *a combination of (ACMRDTUX)* | +| all_changed_files | string | Returns all changed files i.e. *a
combination of all added, copied, modified
and renamed files (ACMR)* | +| all_modified_files | string | Returns all changed files i.e. *a
combination of all added, copied, modified,
renamed and deleted files (ACMRD)*. | +| all_old_new_renamed_files | string | Returns only files that are Renamed
and list their old and new
names. **NOTE:** This requires setting `include_all_old_new_renamed_files`
to `true` (R) | +| any_changed | string | Returns `true` when any of the
filenames provided using the `files` input
has changed. If no `files` have
been specified,an empty string `''` is
returned. i.e. *using a combination of
all added, copied, modified and renamed
files (ACMR)*. | +| any_deleted | string | Returns `true` when any of the
filenames provided using the `files` input
has been deleted. If no `files`
have been specified,an empty string `''`
is returned. (D) | +| any_modified | string | Returns `true` when any of the
filenames provided using the `files` input
has been modified. If no `files`
have been specified,an empty string `''`
is returned. i.e. *using a combination
of all added, copied, modified, renamed,
and deleted files (ACMRD)*. | +| copied_files | string | Returns only files that are Copied
(C). | +| deleted_files | string | Returns only files that are Deleted
(D). | +| modified_files | string | Returns only files that are Modified
(M). | +| only_changed | string | Returns `true` when only files provided
using the `files` input has changed.
If no `files` have been specified,an
empty string `''` is returned. i.e.
*using a combination of all added,
copied, modified and renamed files (ACMR)*.
| +| only_deleted | string | Returns `true` when only files provided
using the `files` input has been
deleted. If no `files` have been
specified,an empty string `''` is returned.
(D) | +| only_modified | string | Returns `true` when only files provided
using the `files` input has been
modified. If no `files` have been
specified,an empty string `''` is returned.(ACMRD).
| +| other_changed_files | string | Returns all other changed files not
listed in the files input i.e.
*using a combination of all added,
copied, modified and renamed files (ACMR)*.
| +| other_deleted_files | string | Returns all other deleted files not
listed in the files input i.e.
*a combination of all deleted files
(D)* | +| other_modified_files | string | Returns all other modified files not
listed in the files input i.e.
*a combination of all added, copied,
modified, and deleted files (ACMRD)* | +| renamed_files | string | Returns only files that are Renamed
(R). | +| type_changed_files | string | Returns only files that have their
file type changed (T). | +| unknown_files | string | Returns only files that are Unknown
(X). | +| unmerged_files | string | Returns only files that are Unmerged
(U). | diff --git a/test/README-outputColumns.md b/test/README-outputColumns.md index e5c57016..ced244b1 100644 --- a/test/README-outputColumns.md +++ b/test/README-outputColumns.md @@ -4,34 +4,34 @@ -| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION | -|-----------------------------------|--------|----------|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| base_sha | string | false | | Specify a different base commit SHA
used for comparing changes | -| diff_relative | string | false | | Exclude changes outside the current directory
and show path names relative to
it. **NOTE:** This requires you to
specify the top level directory via
the `path` input. | -| dir_names | string | false | `"false"` | Output unique changed directories instead of
filenames. **NOTE:** This returns `.` for changed files located in the root
of the project. | -| dir_names_max_depth | string | false | | Maximum depth of directories to output.
e.g `test/test1/test2` with max depth of`2` returns `test/test1`. | -| fetch_depth | string | false | `"50"` | Depth of additional branch history fetched.
**NOTE**: This can be adjusted to
resolve errors with insufficient history. | -| files | string | false | | File and directory patterns to detect
changes using only these list of
file(s) (Defaults to the entire repo)
**NOTE:** Multiline file/directory patterns should not
include quotes. | -| files_from_source_file | string | false | | Source file(s) used to populate the
`files` input. | -| files_ignore | string | false | | Ignore changes to these file(s) **NOTE:**
Multiline file/directory patterns should not include
quotes. | -| files_ignore_from_source_file | string | false | | Source file(s) used to populate the
`files_ignore` input | -| files_ignore_separator | string | false | `"\n"` | Separator used to split the `files_ignore`input | -| files_separator | string | false | `"\n"` | Separator used to split the `files`input | -| include_all_old_new_renamed_files | string | false | `"false"` | Include `all_old_new_renamed_files` output. Note this cangenerate a large output See: [#501](https://github.com/tj-actions/changed-files/issues/501). | -| json | string | false | `"false"` | Output list of changed files in
a JSON formatted string which can
be used for matrix jobs. | -| json_raw_format | string | false | `"false"` | Output list of changed files in
a raw format which means that
the output will not be surrounded
by quotes and special characters will
not be escaped. | -| match_directories | string | false | `"true"` | Indicates whether to include match directories
| -| old_new_files_separator | string | false | `" "` | Split character for old and new
renamed filename pairs. | -| old_new_separator | string | false | `","` | Split character for old and new
filename pairs. | -| output_dir | string | false | `".github/outputs"` | Directory to store output files. | -| path | string | false | `"."` | Specify a relative path under `$GITHUB_WORKSPACE`to locate the repository. | -| quotepath | string | false | `"true"` | Use non ascii characters to match
files and output the filenames completely
verbatim by setting this to `false` | -| separator | string | false | `" "` | Split character for output strings | -| sha | string | false | | Specify a different commit SHA used
for comparing changes | -| since | string | false | | Get changed files for commits whose
timestamp is older than the given
time. | -| since_last_remote_commit | string | true | `"false"` | Use the last commit on the
remote branch as the `base_sha`. Defaults to the last non merge commit
on the target branch for pull
request events and the previous remote
commit of the current branch for
push events. | -| until | string | false | | Get changed files for commits whose
timestamp is earlier than the given
time. | -| write_output_files | string | false | `"false"` | Write outputs to files in the
`.github/outputs` folder by default. | +| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION | +|-----------------------------------|--------|----------|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| base_sha | string | false | | Specify a different base commit SHA
used for comparing changes | +| diff_relative | string | false | | Exclude changes outside the current directory
and show path names relative to
it. **NOTE:** This requires you to
specify the top level directory via
the `path` input. | +| dir_names | string | false | `"false"` | Output unique changed directories instead of
filenames. **NOTE:** This returns `.` for
changed files located in the root
of the project. | +| dir_names_max_depth | string | false | | Maximum depth of directories to output.
e.g `test/test1/test2` with max depth of
`2` returns `test/test1`. | +| fetch_depth | string | false | `"50"` | Depth of additional branch history fetched.
**NOTE**: This can be adjusted to
resolve errors with insufficient history. | +| files | string | false | | File and directory patterns to detect
changes using only these list of
file(s) (Defaults to the entire repo)
**NOTE:** Multiline file/directory patterns should not
include quotes. | +| files_from_source_file | string | false | | Source file(s) used to populate the
`files` input. | +| files_ignore | string | false | | Ignore changes to these file(s) **NOTE:**
Multiline file/directory patterns should not include
quotes. | +| files_ignore_from_source_file | string | false | | Source file(s) used to populate the
`files_ignore` input | +| files_ignore_separator | string | false | `"\n"` | Separator used to split the `files_ignore`
input | +| files_separator | string | false | `"\n"` | Separator used to split the `files`
input | +| include_all_old_new_renamed_files | string | false | `"false"` | Include `all_old_new_renamed_files` output. Note this can
generate a large output See: [#501](https://github.com/tj-actions/changed-files/issues/501). | +| json | string | false | `"false"` | Output list of changed files in
a JSON formatted string which can
be used for matrix jobs. | +| json_raw_format | string | false | `"false"` | Output list of changed files in
a raw format which means that
the output will not be surrounded
by quotes and special characters will
not be escaped. | +| match_directories | string | false | `"true"` | Indicates whether to include match directories
| +| old_new_files_separator | string | false | `" "` | Split character for old and new
renamed filename pairs. | +| old_new_separator | string | false | `","` | Split character for old and new
filename pairs. | +| output_dir | string | false | `".github/outputs"` | Directory to store output files. | +| path | string | false | `"."` | Specify a relative path under `$GITHUB_WORKSPACE`
to locate the repository. | +| quotepath | string | false | `"true"` | Use non ascii characters to match
files and output the filenames completely
verbatim by setting this to `false`
| +| separator | string | false | `" "` | Split character for output strings | +| sha | string | false | | Specify a different commit SHA used
for comparing changes | +| since | string | false | | Get changed files for commits whose
timestamp is older than the given
time. | +| since_last_remote_commit | string | true | `"false"` | Use the last commit on the
remote branch as the `base_sha`. Defaults
to the last non merge commit
on the target branch for pull
request events and the previous remote
commit of the current branch for
push events. | +| until | string | false | | Get changed files for commits whose
timestamp is earlier than the given
time. | +| write_output_files | string | false | `"false"` | Write outputs to files in the
`.github/outputs` folder by default. | diff --git a/test/README.md b/test/README.md index c3d714f1..2b7040f0 100644 --- a/test/README.md +++ b/test/README.md @@ -4,34 +4,34 @@ -| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION | -|-----------------------------------|--------|----------|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| base_sha | string | false | | Specify a different base commit SHA
used for comparing changes | -| diff_relative | string | false | | Exclude changes outside the current directory
and show path names relative to
it. **NOTE:** This requires you to
specify the top level directory via
the `path` input. | -| dir_names | string | false | `"false"` | Output unique changed directories instead of
filenames. **NOTE:** This returns `.` for changed files located in the root
of the project. | -| dir_names_max_depth | string | false | | Maximum depth of directories to output.
e.g `test/test1/test2` with max depth of`2` returns `test/test1`. | -| fetch_depth | string | false | `"50"` | Depth of additional branch history fetched.
**NOTE**: This can be adjusted to
resolve errors with insufficient history. | -| files | string | false | | File and directory patterns to detect
changes using only these list of
file(s) (Defaults to the entire repo)
**NOTE:** Multiline file/directory patterns should not
include quotes. | -| files_from_source_file | string | false | | Source file(s) used to populate the
`files` input. | -| files_ignore | string | false | | Ignore changes to these file(s) **NOTE:**
Multiline file/directory patterns should not include
quotes. | -| files_ignore_from_source_file | string | false | | Source file(s) used to populate the
`files_ignore` input | -| files_ignore_separator | string | false | `"\n"` | Separator used to split the `files_ignore`input | -| files_separator | string | false | `"\n"` | Separator used to split the `files`input | -| include_all_old_new_renamed_files | string | false | `"false"` | Include `all_old_new_renamed_files` output. Note this cangenerate a large output See: [#501](https://github.com/tj-actions/changed-files/issues/501). | -| json | string | false | `"false"` | Output list of changed files in
a JSON formatted string which can
be used for matrix jobs. | -| json_raw_format | string | false | `"false"` | Output list of changed files in
a raw format which means that
the output will not be surrounded
by quotes and special characters will
not be escaped. | -| match_directories | string | false | `"true"` | Indicates whether to include match directories
| -| old_new_files_separator | string | false | `" "` | Split character for old and new
renamed filename pairs. | -| old_new_separator | string | false | `","` | Split character for old and new
filename pairs. | -| output_dir | string | false | `".github/outputs"` | Directory to store output files. | -| path | string | false | `"."` | Specify a relative path under `$GITHUB_WORKSPACE`to locate the repository. | -| quotepath | string | false | `"true"` | Use non ascii characters to match
files and output the filenames completely
verbatim by setting this to `false` | -| separator | string | false | `" "` | Split character for output strings | -| sha | string | false | | Specify a different commit SHA used
for comparing changes | -| since | string | false | | Get changed files for commits whose
timestamp is older than the given
time. | -| since_last_remote_commit | string | true | `"false"` | Use the last commit on the
remote branch as the `base_sha`. Defaults to the last non merge commit
on the target branch for pull
request events and the previous remote
commit of the current branch for
push events. | -| until | string | false | | Get changed files for commits whose
timestamp is earlier than the given
time. | -| write_output_files | string | false | `"false"` | Write outputs to files in the
`.github/outputs` folder by default. | +| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION | +|-----------------------------------|--------|----------|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| base_sha | string | false | | Specify a different base commit SHA
used for comparing changes | +| diff_relative | string | false | | Exclude changes outside the current directory
and show path names relative to
it. **NOTE:** This requires you to
specify the top level directory via
the `path` input. | +| dir_names | string | false | `"false"` | Output unique changed directories instead of
filenames. **NOTE:** This returns `.` for
changed files located in the root
of the project. | +| dir_names_max_depth | string | false | | Maximum depth of directories to output.
e.g `test/test1/test2` with max depth of
`2` returns `test/test1`. | +| fetch_depth | string | false | `"50"` | Depth of additional branch history fetched.
**NOTE**: This can be adjusted to
resolve errors with insufficient history. | +| files | string | false | | File and directory patterns to detect
changes using only these list of
file(s) (Defaults to the entire repo)
**NOTE:** Multiline file/directory patterns should not
include quotes. | +| files_from_source_file | string | false | | Source file(s) used to populate the
`files` input. | +| files_ignore | string | false | | Ignore changes to these file(s) **NOTE:**
Multiline file/directory patterns should not include
quotes. | +| files_ignore_from_source_file | string | false | | Source file(s) used to populate the
`files_ignore` input | +| files_ignore_separator | string | false | `"\n"` | Separator used to split the `files_ignore`
input | +| files_separator | string | false | `"\n"` | Separator used to split the `files`
input | +| include_all_old_new_renamed_files | string | false | `"false"` | Include `all_old_new_renamed_files` output. Note this can
generate a large output See: [#501](https://github.com/tj-actions/changed-files/issues/501). | +| json | string | false | `"false"` | Output list of changed files in
a JSON formatted string which can
be used for matrix jobs. | +| json_raw_format | string | false | `"false"` | Output list of changed files in
a raw format which means that
the output will not be surrounded
by quotes and special characters will
not be escaped. | +| match_directories | string | false | `"true"` | Indicates whether to include match directories
| +| old_new_files_separator | string | false | `" "` | Split character for old and new
renamed filename pairs. | +| old_new_separator | string | false | `","` | Split character for old and new
filename pairs. | +| output_dir | string | false | `".github/outputs"` | Directory to store output files. | +| path | string | false | `"."` | Specify a relative path under `$GITHUB_WORKSPACE`
to locate the repository. | +| quotepath | string | false | `"true"` | Use non ascii characters to match
files and output the filenames completely
verbatim by setting this to `false`
| +| separator | string | false | `" "` | Split character for output strings | +| sha | string | false | | Specify a different commit SHA used
for comparing changes | +| since | string | false | | Get changed files for commits whose
timestamp is older than the given
time. | +| since_last_remote_commit | string | true | `"false"` | Use the last commit on the
remote branch as the `base_sha`. Defaults
to the last non merge commit
on the target branch for pull
request events and the previous remote
commit of the current branch for
push events. | +| until | string | false | | Get changed files for commits whose
timestamp is earlier than the given
time. | +| write_output_files | string | false | `"false"` | Write outputs to files in the
`.github/outputs` folder by default. | @@ -39,28 +39,28 @@ -| OUTPUT | TYPE | DESCRIPTION | -|--------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| added_files | string | Returns only files that are Added
(A). | -| all_changed_and_modified_files | string | Returns all changed and modified files
i.e. *a combination of (ACMRDTUX)* | -| all_changed_files | string | Returns all changed files i.e. *a
combination of all added, copied, modified
and renamed files (ACMR)* | -| all_modified_files | string | Returns all changed files i.e. *a
combination of all added, copied, modified,
renamed and deleted files (ACMRD)*. | -| all_old_new_renamed_files | string | Returns only files that are Renamed
and list their old and new
names. **NOTE:** This requires setting `include_all_old_new_renamed_files`to `true` (R) | -| any_changed | string | Returns `true` when any of the filenames provided using the `files` input has changed. If no `files` have been specified,an empty string `''` is returned. i.e. *using a combination of
all added, copied, modified and renamed
files (ACMR)*. | -| any_deleted | string | Returns `true` when any of the filenames provided using the `files` input has been deleted. If no `files` have been specified,an empty string `''`is returned. (D) | -| any_modified | string | Returns `true` when any of the filenames provided using the `files` input has been modified. If no `files` have been specified,an empty string `''` is returned. i.e. *using a combination
of all added, copied, modified, renamed,
and deleted files (ACMRD)*. | -| copied_files | string | Returns only files that are Copied
(C). | -| deleted_files | string | Returns only files that are Deleted
(D). | -| modified_files | string | Returns only files that are Modified
(M). | -| only_changed | string | Returns `true` when only files provided using the `files` input has changed. If no `files` have been specified,an empty string `''` is returned. i.e. *using a combination of all added,
copied, modified and renamed files (ACMR)*.
| -| only_deleted | string | Returns `true` when only files provided using the `files` input has been deleted. If no `files` have been specified,an empty string `''` is returned.(D) | -| only_modified | string | Returns `true` when only files provided using the `files` input has been modified. If no `files` have beenspecified,an empty string `''` is returned.(ACMRD). | -| other_changed_files | string | Returns all other changed files not
listed in the files input i.e.
*using a combination of all added,
copied, modified and renamed files (ACMR)*.
| -| other_deleted_files | string | Returns all other deleted files not
listed in the files input i.e.
*a combination of all deleted files
(D)* | -| other_modified_files | string | Returns all other modified files not
listed in the files input i.e.
*a combination of all added, copied,
modified, and deleted files (ACMRD)* | -| renamed_files | string | Returns only files that are Renamed
(R). | -| type_changed_files | string | Returns only files that have their
file type changed (T). | -| unknown_files | string | Returns only files that are Unknown
(X). | -| unmerged_files | string | Returns only files that are Unmerged
(U). | +| OUTPUT | TYPE | DESCRIPTION | +|--------------------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| added_files | string | Returns only files that are Added
(A). | +| all_changed_and_modified_files | string | Returns all changed and modified files
i.e. *a combination of (ACMRDTUX)* | +| all_changed_files | string | Returns all changed files i.e. *a
combination of all added, copied, modified
and renamed files (ACMR)* | +| all_modified_files | string | Returns all changed files i.e. *a
combination of all added, copied, modified,
renamed and deleted files (ACMRD)*. | +| all_old_new_renamed_files | string | Returns only files that are Renamed
and list their old and new
names. **NOTE:** This requires setting `include_all_old_new_renamed_files`
to `true` (R) | +| any_changed | string | Returns `true` when any of the
filenames provided using the `files` input
has changed. If no `files` have
been specified,an empty string `''` is
returned. i.e. *using a combination of
all added, copied, modified and renamed
files (ACMR)*. | +| any_deleted | string | Returns `true` when any of the
filenames provided using the `files` input
has been deleted. If no `files`
have been specified,an empty string `''`
is returned. (D) | +| any_modified | string | Returns `true` when any of the
filenames provided using the `files` input
has been modified. If no `files`
have been specified,an empty string `''`
is returned. i.e. *using a combination
of all added, copied, modified, renamed,
and deleted files (ACMRD)*. | +| copied_files | string | Returns only files that are Copied
(C). | +| deleted_files | string | Returns only files that are Deleted
(D). | +| modified_files | string | Returns only files that are Modified
(M). | +| only_changed | string | Returns `true` when only files provided
using the `files` input has changed.
If no `files` have been specified,an
empty string `''` is returned. i.e.
*using a combination of all added,
copied, modified and renamed files (ACMR)*.
| +| only_deleted | string | Returns `true` when only files provided
using the `files` input has been
deleted. If no `files` have been
specified,an empty string `''` is returned.
(D) | +| only_modified | string | Returns `true` when only files provided
using the `files` input has been
modified. If no `files` have been
specified,an empty string `''` is returned.(ACMRD).
| +| other_changed_files | string | Returns all other changed files not
listed in the files input i.e.
*using a combination of all added,
copied, modified and renamed files (ACMR)*.
| +| other_deleted_files | string | Returns all other deleted files not
listed in the files input i.e.
*a combination of all deleted files
(D)* | +| other_modified_files | string | Returns all other modified files not
listed in the files input i.e.
*a combination of all added, copied,
modified, and deleted files (ACMRD)* | +| renamed_files | string | Returns only files that are Renamed
(R). | +| type_changed_files | string | Returns only files that have their
file type changed (T). | +| unknown_files | string | Returns only files that are Unknown
(X). | +| unmerged_files | string | Returns only files that are Unmerged
(U). |