PACTA_analysis icon indicating copy to clipboard operation
PACTA_analysis copied to clipboard

extend styler action to R files not in R directory

Open cjyetman opened this issue 4 years ago • 2 comments

Currently, the PR commands GitHub Action workflow only runs styler on R files that are in the R directory. https://github.com/2DegreesInvesting/PACTA_analysis/blob/8af0ac58bf48807f3d77d651a5271e1900b02f7f/.github/workflows/pr-commands.yaml#L46

Could this be modified to work with styler::style_dir() instead and target the root directory so it covers all files? Is there a way to target only R files that were modified in the triggering PR so it doesn't add a commit that changes numerous unrelated files? Would this be dangerous since a simple change to one of the existing R files in the root directory would trigger hundreds of changes across the file that are totally unrelated?

@maurolepore you're probably best able to assess this?

cjyetman avatar Jan 11 '21 10:01 cjyetman