Skip to content
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

Add action for useful PR commands #16

Open
jdhoffa opened this issue Jan 24, 2024 · 5 comments
Open

Add action for useful PR commands #16

jdhoffa opened this issue Jan 24, 2024 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@jdhoffa
Copy link
Member

jdhoffa commented Jan 24, 2024

It is possible to ask GitHub to run common commands like roxygen2::roxygenise() to document a package, or styler::style_pkg() directly from GitHub. It will then commit the results to the PR. You do so by typing \style or \document as a comment on the GH PR.

I know @cjyetman doesn't particularly like things that make commits for him, but these are entirely opt-in (meaning people that want to use them can use them, and people that don't don't need to).

See here: https://github.com/RMI-PACTA/r2dii.data/blob/main/.github/workflows/pr-commands.yaml

@cjyetman
Copy link
Member

yes it's possible. yes I don't like 😄

@jdhoffa
Copy link
Member Author

jdhoffa commented Jan 24, 2024

Would still be nice to have it in this repo so that maintainers can optionally include it (the ones that want it)

@jdhoffa jdhoffa added the documentation Improvements or additions to documentation label Jan 24, 2024
@cjyetman
Copy link
Member

Note that there are many ways to trigger a workflow. I always felt like the "\style" comment was a bit hacky. Could also be something like labelling a PR with a "auto-style" label or something.

@jdhoffa
Copy link
Member Author

jdhoffa commented Jan 24, 2024

¯_(ツ)_/¯ i'm not really picky about how to trigger it tbh.

Happy if you want to do it a custom way via labels, but I wolud prefer to just leave it the way r-lib does it so we don't unnecessarily add extra maintenance burden on ourselves if we don't have to (even if it's a tiny burden lol)

@AlexAxthelm
Copy link
Contributor

NB: since I'm expecting everything in the actions repo to be invoked with

on:
  workflow_call:

anything that's invoked on comment will need to have a workflow file in the content repo:

.github
\- workflows
    |- docker.yml
    |- R-package.yml
   \- comments.yml

@AlexAxthelm AlexAxthelm transferred this issue from another repository Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants