Hi,
We're using code autoformat tools locally but need to move them to pipeline. How do we commit changes applied by autoformat tools in pipeline directly?
After formatting code in the pipeline, we just commit it like this:
Make sure the pipeline has permission to push changes.
Run your formatter (like Prettier, ESLint, etc.).
Use Git commands to commit and push:
git config --global user.email "pipeline@srblinds.com"
git config --global user.name "SR Blinds Bot"
git add .git commit -m "chore: auto-format code [skip ci]"
git push origin HEAD:main
That [skip ci]
part helps avoid triggering the pipeline again. Quick and clean.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.