You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've often been asked why Restyled isn't "just" a GitHub Action. The actual reason is that GitHub Actions did not exist at the time I created Restyled. It also is already usable as a GitHub Action: the core restyling functionality is a standalone CLI and corresponding Docker image. Motivated users could install the CLI or pull the image and run it as a GitHub Action. It will restyle the files of the local checkout, after which they could do what they want, be it push those changes or open a sibling PR, just as Restyled does today.
That said, it's harder than it should be and non-obvious how to do so. I would like to see the CLI extended to cater to this use-case, I'd like our own distribution processes more amenable to it (i.e. ship binary-attached Releases instead of, or in addition to, the Docker images), and I'd like a nice actions/setup and actions/run to exist to encapsulate as much as possible.
I think it would be relatively easy to make the standard "restyle a PR and open a sibling" functionality look like:
I think leaving the create-pull-request step to the outside is what we should do for now, because it minimizes what we have to change to make this possible and start suggesting it to users, while maximizing flexibility. If/when we decide that GHA is the only way to run Restyled, and we remove all the implementation surrounding the hosted version, we can take a look at what's left before deciding on other trade-offs of ergonomics-vs-complexity.
The text was updated successfully, but these errors were encountered:
I've often been asked why Restyled isn't "just" a GitHub Action. The actual reason is that GitHub Actions did not exist at the time I created Restyled. It also is already usable as a GitHub Action: the core restyling functionality is a standalone CLI and corresponding Docker image. Motivated users could install the CLI or pull the image and run it as a GitHub Action. It will restyle the files of the local checkout, after which they could do what they want, be it push those changes or open a sibling PR, just as Restyled does today.
That said, it's harder than it should be and non-obvious how to do so. I would like to see the CLI extended to cater to this use-case, I'd like our own distribution processes more amenable to it (i.e. ship binary-attached Releases instead of, or in addition to, the Docker images), and I'd like a nice
actions/setup
andactions/run
to exist to encapsulate as much as possible.I think it would be relatively easy to make the standard "restyle a PR and open a sibling" functionality look like:
I think leaving the create-pull-request step to the outside is what we should do for now, because it minimizes what we have to change to make this possible and start suggesting it to users, while maximizing flexibility. If/when we decide that GHA is the only way to run Restyled, and we remove all the implementation surrounding the hosted version, we can take a look at what's left before deciding on other trade-offs of ergonomics-vs-complexity.
The text was updated successfully, but these errors were encountered: