Commit Graph

138 Commits

Author SHA1 Message Date
Derek Ditch
6a7b2d092f Use npx to execute prettier (#145)
* fix: bumped version in readme

* Use npx to execute prettier

Fixes: https://github.com/creyD/prettier_action/issues/113

---------

Co-authored-by: Conrad <grosserconrad@gmail.com>
2025-06-09 23:43:18 +02:00
af8ff244c5 fix: #144 Moved to ID based noreply pattern 2025-05-09 14:39:25 +02:00
ff6bab6030 fix: fixed a bug with INPUT_ONLY_CHANGED_PR 2025-05-08 13:28:44 +02:00
e2704493af feat: #98 added option to allow for other plugins 2025-05-08 13:20:52 +02:00
9f54668ece fix: minor documentation cleanups 2025-05-08 10:32:44 +02:00
eeb940db6d fix: fixed codacy error 2025-05-08 10:24:50 +02:00
12efc36860 fix: codacy warning 2025-05-08 10:23:14 +02:00
John Jetmore
e53f331f48 Add only_changed_pr (#135)
* 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.
2025-05-08 10:18:46 +02:00
John Jetmore
a3561a8976 set INPUT_WORKING_DIRECTORY if not already set 2024-01-29 12:32:01 -05:00
f32e6a975a Fixing bug #128 2024-01-10 12:43:00 +01:00
5d0450c2bc Addede step summary in GitHub 2023-10-03 20:37:27 +02:00
Derek Brown
0fc0cf4723 feat: Allow overriding actor (#126)
Co-authored-by: Conrad <grosserconrad@gmail.com>
2023-08-21 21:05:34 +02:00
Federico M. Facca
4bd40fc486 Support not exiting the process in case of changes in dry mode (#122)
Co-authored-by: Conrad <grosserconrad@gmail.com>
2023-07-20 16:39:13 +02:00
Blake Dunson
9aba96f268 Allow amended commits to be empty (#119)
Co-authored-by: Conrad <grosserconrad@gmail.com>
2023-06-30 17:40:51 +02:00
473978add9 Added default for working_directory 2023-05-24 11:05:21 +02:00
d04162ee72 Added default for prettier_version 2023-05-24 11:01:47 +02:00
9436c53771 Added debug for prettier test result in the log 2023-01-23 14:16:43 +01:00
2826053f0c Added option clean_node_folder for #108 2023-01-23 12:56:23 +01:00
607ddfdc57 Merge pull request #87 from bercos/master
Fix #78
2022-01-15 22:08:45 +01:00
Bernie Cosgriff
9dff813935 Fix #78
Fix https://github.com/creyD/prettier_action/issues/78 by updating the regex.

I tested the regex but was not sure how to test the action. The regex should cover all three valid cases outlined here https://prettier.io/docs/en/plugins.html.
2022-01-14 16:27:39 -07:00
Tim Morgan
8a16fc9688 Don't install plugins globally
This fixes a problem where @prettier/plugin-ruby was not being used.
2022-01-08 12:37:59 -06:00
Anselm Hahn
13fd7a03b4 Fixed #81 2021-12-28 18:32:29 +01:00
26c4892179 Fixed a bug with missing " 2021-12-06 12:22:36 +01:00
86625cc217 Merged the input commit description if statement 2021-12-06 12:18:46 +01:00
fdbbee3567 Bugfix for the commit description 2021-12-06 12:15:24 +01:00
f9f10e0719 Added spacing for commit description 2021-12-06 12:11:52 +01:00
insyri
f44961013c Variable assignment fix, issued via CodeFactor 2021-12-04 18:58:13 -05:00
insyri
a9474e2eb8 Corrected if/else for INPUT_COMMIT_DESCRIPTION. 2021-12-04 18:46:31 -05:00
41bf601bb6 Merge pull request #71 from sksat/handle-space-in-fname
handle space in file name
2021-11-30 17:58:28 +01:00
8efb5a885e Added working_directory parameter 2021-11-30 17:18:31 +01:00
sksat
b90e27731a fix: handle space in changed file name 2021-11-24 00:30:10 +09:00
b1dc9cd3b3 Merge pull request #67 from AndyA/master
Don't delete package-lock.json
2021-10-31 15:06:10 +01:00
insyri
39357d386a added $INPUT_COMMIT_DESCRIPTION to entrypoint.sh
im unfamiliar with shell so this is what i did with some research, the inline if statement is just a personal design/formatting choice.
2021-10-22 09:03:21 -04:00
Andy Armstrong
a6d8de1638 Don't delete package-lock.json 2021-10-19 13:42:28 +01:00
Pedro Rodrigues
6c9f8f188e Displaying prettier error when a glob doesn't match any files 2021-06-21 23:05:35 -03:00
Pedro Rodrigues
8002e3525b Making variable INPUT_PUSH_OPTIONS not required 2021-06-21 23:04:49 -03:00
Pedro Rodrigues
c97500dd80 Checking if generated files exist before trying to delete them 2021-06-21 23:03:58 -03:00
654f901ff9 Merge branch 'dev' into override-token 2021-06-17 00:21:33 +02:00
Pedro Rodrigues
4f318753d5 Add support to override the default github token 2021-06-16 19:08:28 -03:00
426f319c74 Merge branch 'dev' into issue-37-dry-run-reporting-unpretty 2021-05-21 09:48:29 +02:00
bb9aa745eb Merge pull request #53 from stevelacy/master
Add input git push options
2021-05-21 09:46:51 +02:00
Steve Lacy
707db76837 Add input git push options 2021-05-20 09:39:31 -10:00
Fabricio Sander
634a3d2075 fix: changes the logic to handle dry-run with --write option and corrects the logic as it will never have changes on dry-run 2021-04-13 16:34:40 -03:00
0b7e2710f2 Merge branch 'dev' into master 2021-04-10 16:13:21 +02:00
fd9337d75f Merge pull request #46 from fsz-codeshop/issue-37-dry-run-reporting-unpretty
Fixes Issue #37 [BUG] Dry run reporting unpretty files when all files match styles
2021-04-10 16:10:33 +02:00
Fabricio Sander
c2e2730594 fix: fixes codefactor recommendation 2021-03-25 21:56:57 -03:00
Fabricio Sander
2069f26b6e other: improves the log output by not having and out of range message 2021-03-25 21:36:51 -03:00
Fabricio Sander
3d912f60d1 fix: added variable declaration 2021-03-25 21:28:17 -03:00
Fabricio Sander
67234beef0 other: testing approach with multiple commands on fail 2021-03-25 21:21:06 -03:00
Fabricio Sander
2602a7aad8 other: testing approach using pipefail 2021-03-25 21:10:04 -03:00