This addresses GitHub issue #41 by adding an optional `use_repo_config` parameter
that allows the action to automatically detect and use the repository's prettier
configuration files and .prettierignore.
Changes:
- Added `use_repo_config` input parameter (default: false for backward compatibility)
- Implemented config file detection in entrypoint.sh for all prettier config formats
- Automatically changes file pattern to current directory when using repo config
- Provides helpful messages about found config files and warnings when none exist
- Updated README with new parameter documentation and Example 5
Benefits:
- Users no longer need to manually specify --config or --ignore-path
- Eliminates confusion about whether config files are being used
- Maintains backward compatibility (opt-in via parameter)
- Supports all prettier configuration file formats
Related: #41
* allow `only_changed` and `dry` to work together
Before this change, if you tried to use `dry` and `only_changed together, it acted as if `only_changed` was ignored. There was no code specific to `only_changed` down the `dry` code path.
This commit’s solution is to run prettier on the entire code base (as was already being done) and then, before doing any comparisons, reset changes to files that were not modified in the last commit.
* add `only_changed_pr` option
This behaves similarly to only_changed, except instead of only considering files which were modified in the last commit, this option only considers files which were modified in any commit included in the current PR.
The entrypoint script checks for correctly named Prettier plugins on [lines 44–45](https://github.com/creyD/prettier_action/blob/master/entrypoint.sh#L44-L45), but the description in the config file and README are not consistent.
This updates those references to clarify how plugins should be specified.