-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add args
input
#13
Conversation
Adds `args` input to allow for passing arbitrary additional arguments to `dprint check` **Alternatives** Add specific inputs for the things that I need: - `files` - `--excludes`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thank you!
Could you document this in the README briefly?
thanks for the quick review! Does the example I added work? (It's the actual usecase I need it for) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep that should work, just one clarifying syntax question :)
args: >- | ||
--allow-no-files | ||
${{ steps.changed-files.outputs.all_changed_files }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
args: >- | |
--allow-no-files | |
${{ steps.changed-files.outputs.all_changed_files }} | |
args: | | |
--allow-no-files | |
${{ steps.changed-files.outputs.all_changed_files }} |
I am not familiar with that yaml syntax, does a multi-line string also work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>
makes it so that lines are separated with spaces instead of newlines, such that
a: >
b
c
Becomes
{"a": "b c\n"}
-
chomps the trailing newline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use https://yaml-multiline.info/ ~ once per month for silly yaml features like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem with |
here is that it would end up with the command
dprint check --allow-no-files
file1 file2 ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use yaml-multiline.info ~ once per month for silly yaml features like this
It is cool and scary at the same time that yaml supports this. Thanks for explaining!
.github/workflows/ci.yml
Outdated
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is with all this whitespace here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
Adds
args
input to allow for passing arbitrary additional arguments todprint check
Alternatives considered
Add specific inputs for the things that I need:
files
--excludes
--allow-no-files