From c24f4675b8bbc7510055b91c90511cf0068b302c Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 8 Feb 2023 15:04:16 +0100 Subject: [PATCH] docs: document writing_changes in the Github action --- docs/github-action.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/github-action.md b/docs/github-action.md index b3a2b98..c7803ec 100644 --- a/docs/github-action.md +++ b/docs/github-action.md @@ -32,13 +32,23 @@ jobs: with: files: ./file.txt isolated: true + + - name: Writes changes in the local checkout + uses: crate-ci/typos@master + with: + write_changes: true ``` **Important** for any of the examples above, make sure that you choose a release or commit as a version, and not a branch (which is a moving target). + Also make sure when referencing relative file paths to use `./` (e.g., `./file.txt` instead of `file.txt`. +`write_changes` doesn't commit or push anything to the branch. It only writes the changes locally +to disk, and this can be combined with other actions, for instance that will [submit code +suggestions based on that local diff](https://github.com/getsentry/action-git-diff-suggestions). + ## Variables | Name | Description | Required | Default | @@ -46,3 +56,4 @@ Also make sure when referencing relative file paths to use `./` (e.g., `./file.t | files| Files or patterns to check | false | If not defined, entire repository is checked | | isolated | Ignore implicit configuration files | false | false| | config | Use a custom config file (must exist) | false | not set | +| write_changes | Writes changes on the Action's local checkout | false | false |