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
{{ message }}
Repository navigation
Ability to run arbitrary scripts before a commit is made #178
Is your feature request related to a problem? Please describe.
I'm working on integrating CrowdIn with a project using "changesets". I'd like to run a script that adds a file to be committed alongside the translations.
Describe the solution you'd like
A before_commit_script option in the action for some arbitrary bash code to be run before files are committed to the localization branch.
Describe alternatives you've considered
I have a different github workflow rigged up but it would be nice to not need an additional workflow.
Hi @renchap, I just saw your solution and it looks pretty good 🙂
Yes, and I understand why it would be hard to do in the action, because your command will be ran from the container, where you most probably dont have the dependencies you need.
Related to this, I was not expecting the files generated by the action to be owned by root:root, you may want to have their permissions fixed before the action finishes.
Activity
andrii-bodnar commentedon Jun 22, 2023
Hi @probablyup, thanks for the request!
Currently, you can disable pull request creation by the Action and use a separate Action for this after making the necessary changes:
Visit the Create Pull Request GH Action page to see all the available options.
P.S. I didn't test this example, but the workflow should look like the above.
renchap commentedon Jul 18, 2023
We are looking for a similar option, but in our case to run linting & normalisation scripts before the commit.
andrii-bodnar commentedon Jul 20, 2023
Hi @renchap, I just saw your solution and it looks pretty good 🙂
renchap commentedon Jul 20, 2023
Yes, and I understand why it would be hard to do in the action, because your command will be ran from the container, where you most probably dont have the dependencies you need.
Related to this, I was not expecting the files generated by the action to be owned by
root:root, you may want to have their permissions fixed before the action finishes.