nmfs-fish-tools / ghactions4r

Reusable github actions workflows for R packages
https://nmfs-fish-tools.github.io/ghactions4r/
12 stars 1 forks source link

[Feature]: template for adding a new :octocat: action #68

Closed kellijohnson-NOAA closed 6 months ago

kellijohnson-NOAA commented 1 year ago

Is your feature request related to a problem? Please describe.

I recently created a PR with a new :octocat: action and I was not sure which files needed modified. Clearly, there is a need for the .yaml or .yml, not sure why we are using the latter, file but it is unclear if there also needs to be a call-.yml file as well as a template in inst/.

Describe the solution you would like.

I think using a function that calls a {whisker} template or some other templating software that populates "dummy" files for creating a new :octocat: action would be really slick.

Describe alternatives you have considered

Putting directions in the README or a vignette to describe to collaborators how to add a new action would also be helpful if the suggested fix is too complicated.

Additional context

Whisker is a {{Mustache}} implementation in R confirming to the Mustache specification.

iantaylor-NOAA commented 1 year ago

Corrected link to {{Mustache}} https://mustache.github.io/ (.io instead of .com)

k-doering-NOAA commented 1 year ago

@kellijohnson-NOAA , this is a great suggestion and thank you for suggesting tools!

I looked up .yml vs .yaml and apparently both are fine. It sounds like historically some OSes only allowed 3 letter extensions, hence .yml, but this is no longer a restriction.

k-doering-NOAA commented 1 year ago

@kellijohnson-NOAA I like the whisker suggestion, but I've started with the alternative now of at least a checklist on the readme in https://github.com/nmfs-fish-tools/ghactions4r/commit/6602290f5a94f1d503d5cd711194f5d5cd4f1ac3 (currently on a feature branch, but will be merged into main soon). I'll leave this open for now in case I have time to develop with whisker template, which does seem really slick.

k-doering-NOAA commented 6 months ago

While the whisker template is cool, I don't think it would get enough use to spend the time developing it. Instead, I read through the checklist and added some additional details to be as clear as possible for contributors.