Skip to content

Commit a3ed46f

Browse files
kranthipoturajuKranthi Poturajustefanzweifel
authored
docs: fix typos, grammar, and formatting across markdown files (#408)
Co-authored-by: Kranthi Poturaju <Kranthi.Poturaju1@aexp.com> Co-authored-by: Stefan Zweifel <stefanzweifel@users.noreply.github.com>
1 parent b4d688c commit a3ed46f

3 files changed

Lines changed: 32 additions & 30 deletions

File tree

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,4 @@ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.ht
7272

7373
[homepage]: https://www.contributor-covenant.org
7474

75-
For answers to common questions about this code of conduct, see
76-
https://www.contributor-covenant.org/faq
75+
For answers to common questions about this code of conduct, see the [Contributor Covenant FAQ](https://www.contributor-covenant.org/faq).

README.md

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If your use case is not covered by git-auto-commit, you might want to check out
2020

2121
Adding git-auto-commit to your Workflow only takes a couple lines of code.
2222

23-
1. Set the `contents`-permission of the default GITHUB_TOKEN to `true`. (Required to push new commits to the repository)
23+
1. Set the `contents`-permission of the default GITHUB_TOKEN to `write`. (Required to push new commits to the repository)
2424
2. Add the following step at the end of your job, after other steps that might add or change files.
2525

2626
```yaml
@@ -69,7 +69,7 @@ The following is an extended example with all available options.
6969
# Defaults to "Apply automatic changes"
7070
commit_message: Automated Change
7171
72-
# Optional. Remote branch name where commit is going to be pushed to.
72+
# Optional. Remote branch name where commit is going to be pushed to.
7373
# Defaults to the current branch.
7474
branch: feature-123
7575
@@ -92,8 +92,8 @@ The following is an extended example with all available options.
9292
commit_user_name: My GitHub Actions Bot # defaults to "github-actions[bot]"
9393
commit_user_email: my-github-actions-bot@example.org # defaults to "41898282+github-actions[bot]@users.noreply.github.com"
9494
commit_author: Author <actions@github.com> # defaults to "username <numeric_id+username@users.noreply.github.com>", where "numeric_id" and "username" belong to the author of the commit that triggered the run
95-
96-
# Optional. Tag name to be created in the local repository and
95+
96+
# Optional. Tag name to be created in the local repository and
9797
# pushed to the remote repository on the defined branch.
9898
# If only one of `tag_name` or `tagging_message` is provided, the value of the provided field will be used for both tag name and message.
9999
tag_name: 'v1.0.0'
@@ -102,7 +102,7 @@ The following is an extended example with all available options.
102102
# If only one of `tag_name` or `tagging_message` is provided, the value of the provided field will be used for both tag name and message.
103103
tagging_message: 'Codename "Sunshine"'
104104

105-
# Optional. Option used by `git-status` to determine if the repository is
105+
# Optional. Option used by `git-status` to determine if the repository is
106106
# dirty. See https://git-scm.com/docs/git-status#_options
107107
status_options: '--untracked-files=no'
108108

@@ -113,27 +113,27 @@ The following is an extended example with all available options.
113113
# Optional. Options used by `git-push`.
114114
# See https://git-scm.com/docs/git-push#_options
115115
push_options: '--force'
116-
116+
117117
# Optional. Disable dirty check and always try to create a commit and push
118-
skip_dirty_check: true
118+
skip_dirty_check: true
119119

120120
# Optional. Skip internal call to `git fetch`
121121
skip_fetch: true
122122

123123
# Optional. Skip internal call to `git checkout`
124124
skip_checkout: true
125-
125+
126126
# Optional. Skip internal call to `git push`
127127
skip_push: true
128128

129-
# Optional. Prevents the shell from expanding filenames.
129+
# Optional. Prevents the shell from expanding filenames.
130130
# Details: https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html
131131
disable_globbing: true
132132

133133
# Optional. Create given branch name in local and remote repository.
134134
create_branch: true
135135

136-
# Optional. Creates a new tag and pushes it to remote without creating a commit.
136+
# Optional. Creates a new tag and pushes it to remote without creating a commit.
137137
# Skips dirty check and changed files. Must be used in combination with `tag` and `tagging_message`.
138138
create_git_tag_only: false
139139
```
@@ -214,11 +214,11 @@ The goal of this Action is to be "the Action for committing files for the 80% us
214214

215215
The following is a list of edge cases the Action knowingly does not support:
216216

217-
**No `git pull` when the repository is out of date with remote.** The Action will not do a `git pull` before doing the `git push`. **You** are responsible for keeping the repository up to date in your Workflow runs.
217+
**No `git pull` when the repository is out of date with remote.** The Action will not do a `git pull` before doing the `git push`. **You** are responsible for keeping the repository up to date in your Workflow runs.
218218

219219
**No support for running the Action in build matrices**. If your Workflow is using build matrices, and you want that each job commits and pushes files to the remote, you will run into the issue, that the repository in the workflow will become out of date. As the Action will not do a `git pull` for you, you have to do that yourself.
220220

221-
**No support for `git rebase` or `git merge`**. There are many strategies on how to integrate remote upstream changes to a local repository. `git-auto-commit` does not want to be responsible for doing that.
221+
**No support for `git rebase` or `git merge`**. There are many strategies on how to integrate remote upstream changes to a local repository. `git-auto-commit` does not want to be responsible for doing that.
222222

223223
**No support for detecting line break changes between CR (Carriage Return) and LF (Line Feed)**. This is a low level issue, you have to resolve differently in your project. Sorry.
224224

@@ -272,7 +272,7 @@ Does your workflow change a file, but "git-auto-commit" does not detect the chan
272272

273273
### Multiline Commit Messages
274274

275-
If your commit message should span multiple lines, you have to create a separate step to generate the string.
275+
If your commit message should span multiple lines, you have to create a separate step to generate the string.
276276

277277
The example below can be used as a starting point to generate a multiline commit meesage. Learn more how multiline strings in GitHub Actions work in the [GitHub documentation](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands#multiline-strings).
278278

@@ -298,11 +298,11 @@ The example below can be used as a starting point to generate a multiline commit
298298
id: commit
299299
with:
300300
commit_message: ${{ steps.commit_message_step.outputs.commit_message }}
301-
```
301+
```
302302

303303
### Signing Commits
304304

305-
If you would like to sign your commits using a GPG key, you will need to use an additional action.
305+
If you would like to sign your commits using a GPG key, you will need to use an additional action.
306306
You can use the [crazy-max/ghaction-import-gpg](https://github.com/crazy-max/ghaction-import-gpg) action and follow its setup instructions.
307307

308308
As git-auto-commit by default does not use **your** username and email when creating a commit, you have to override these values in your workflow.
@@ -329,6 +329,7 @@ See discussion [#334](https://github.com/stefanzweifel/git-auto-commit-action/di
329329

330330
### Use in forks from private repositories
331331

332+
332333
By default, GitHub Actions doesn't run Workflows on forks from **private** repositories. To enable Actions for **private** repositories enable "Run workflows from pull requests" in your repository settings.
333334

334335
See [this announcement from GitHub](https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/) or the [GitHub docs](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#enabling-workflows-for-private-repository-forks) for details.
@@ -342,20 +343,20 @@ See [this announcement from GitHub](https://github.blog/2020-08-03-github-action
342343
> \
343344
> **If you use this Action in combination with a linter/fixer, it's easier if you run the Action on `push` on your `main`-branch.**
344345

345-
> [!WARNING]
346+
> [!WARNING]
346347
> Due to limitations of GitHub, this Action currently can't push commits to a base repository, if the fork _lives_ under an organisation. See [github/community#6634](https://github.com/orgs/community/discussions/5634) and [this comment](https://github.com/stefanzweifel/git-auto-commit-action/issues/211#issuecomment-1428849944) for details.
347348

348-
By default, this Action will not run on Pull Requests which have been opened by forks. (This is a limitation by GitHub, not by us.)
349-
However, there are a couple of ways to use this Actions in Workflows that should be triggered by forked repositories.
349+
By default, this Action will not run on Pull Requests which have been opened by forks. (This is a limitation by GitHub, not by us.)
350+
However, there are a couple of ways to use this Action in Workflows that should be triggered by forked repositories.
350351

351352
### Workflow should run in **base** repository
352353

353354
> [!CAUTION]
354-
> The following section explains how you can use git-auto-commit in combination with the `pull_request_target` trigger.
355-
> **Using `pull_request_target` in your workflows can lead to repository compromise as [mentioned](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) by GitHub's own security team. This means, that a bad actor could potentially leak/steal your GitHub Actions repository secrets.**
355+
> The following section explains how you can use git-auto-commit in combination with the `pull_request_target` trigger.
356+
> **Using `pull_request_target` in your workflows can lead to repository compromise as [mentioned](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) by GitHub's own security team. This means, that a bad actor could potentially leak/steal your GitHub Actions repository secrets.**
356357
> Please be aware of this risk when using `pull_request_target` in your workflows.
357-
>
358-
> If your workflow runs code-fixing tools, consider running the workflow on your default branch by listening to the `push` event or use a third-party tool like [autofix.ci](https://autofix.ci/).
358+
>
359+
> If your workflow runs code-fixing tools, consider running the workflow on your default branch by listening to the `push` event or use a third-party tool like [autofix.ci](https://autofix.ci/).
359360
> We keep this documentation around, as many questions came in over the years, on how to use this action for public forks.
360361

361362
The workflow below runs whenever a commit is pushed to the `main`-branch or when activity on a pull request happens, by listening to the [`pull_request_target`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target) event.
@@ -404,7 +405,7 @@ For more information about running Actions on forks, see [this announcement from
404405

405406
If you would like to use this Action to create a commit using [`--amend`](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---amend) and [`--no-edit`](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---no-edit) you need to make some adjustments.
406407

407-
> [!CAUTION]
408+
> [!CAUTION]
408409
> You should understand the implications of rewriting history if you amend a commit that has already been published. [See rebasing](https://git-scm.com/docs/git-rebase#_recovering_from_upstream_rebase).
409410

410411
First, you need to extract the previous commit message by using `git log -1 --pretty=%s`.
@@ -417,7 +418,7 @@ Finally, you have to use `push_options: '--force'` to overwrite the git history
417418
The steps in your workflow might look like this:
418419

419420
```yaml
420-
- uses: actions/checkout@4
421+
- uses: actions/checkout@v4
421422
with:
422423
# Fetch the last 2 commits instead of just 1. (Fetching just 1 commit would overwrite the whole history)
423424
fetch-depth: 2
@@ -442,6 +443,7 @@ The steps in your workflow might look like this:
442443
See discussion in [#159](https://github.com/stefanzweifel/git-auto-commit-action/issues/159#issuecomment-845347950) for details.
443444
444445
## Troubleshooting
446+
445447
### Action does not push commit to repository
446448
447449
Make sure to [checkout the correct branch](#checkout-the-correct-branch).
@@ -460,7 +462,7 @@ If you still can't push the commit, and you're using branch protection rules or
460462
The default `GITHUB_TOKEN` issued by GitHub Action does not have permission to make changes to workflow files located in `.github/workflows/`.
461463
To fix this, please create a personal access token (PAT) and pass the token to the `actions/checkout`-step in your workflow. (Similar to [how to push to protected branches](https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches)).
462464
463-
If a PAT does not work for you, you could also create a new GitHub app and use it's token in your workflows. See [this comment in #87](https://github.com/stefanzweifel/git-auto-commit-action/issues/87#issuecomment-1939138661) for details.
465+
If a PAT does not work for you, you could also create a new GitHub app and use its token in your workflows. See [this comment in #87](https://github.com/stefanzweifel/git-auto-commit-action/issues/87#issuecomment-1939138661) for details.
464466
465467
See [#322](https://github.com/stefanzweifel/git-auto-commit-action/issues/322) for details and discussions around this topic.
466468
@@ -483,7 +485,7 @@ If you create a fine-grained personal access token, apply the `Contents`-permiss
483485
You can learn more about Personal Access Token in the [GitHub documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).
484486
485487
486-
> [!TIP]
488+
> [!TIP]
487489
> If you're working in an organisation, and you don't want to create the PAT from your personal account, we recommend using a bot-account for such tokens.
488490
489491
If you go the "force pushes" route, you have to enable force pushes to a protected branch (see [documentation](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)) and update your Workflow to use force push like this.
@@ -509,7 +511,7 @@ See [Issue #227](https://github.com/stefanzweifel/git-auto-commit-action/issues/
509511
510512
### Custom `file_pattern`, changed files but seeing "Working tree clean. Nothing to commit." in the logs
511513
512-
If you're using a custom `file_pattern` and the Action does not detect the changes made in your worfklow, you're probably running into a globbing issue.
514+
If you're using a custom `file_pattern` and the Action does not detect the changes made in your workflow, you're probably running into a globbing issue.
513515
514516
Let's imagine you use `file_pattern: '*.md'` to detect and commit changes to all Markdown files in your repository.
515517
If your Workflow now only updates `.md`-files in a subdirectory, but you have an untouched `.md`-file in the root of the repository, the git-auto-commit Action will display "Working tree clean. Nothing to commit." in the Workflow log.

UPGRADING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
The previously removed options `create_branch`, `skip_fetch`, and `skip_checkout` have been reintroduced in git-auto-commit v7. If you had removed these options from your workflows when upgrading to v6, you can now add them back if needed.
66

7-
Tagging a commit has been reworked. In addition to the existing `tagging_message`-option, a new `tag_name` option has been added. If you were using `tagging_message`, you can continue to do so, but if you want to specify a custom tag name and tag message, you can now use the `tag_name` and `tagging_message` option.
7+
Tagging a commit has been reworked. In addition to the existing `tagging_message`-option, a new `tag_name` option has been added. If you were using `tagging_message`, you can continue to do so, but if you want to specify a custom tag name and tag message, you can now use the `tag_name` and `tagging_message` options.
8+
89
(Specifying a `tagging_message` without a `tag_name` will create a tag with the name and message both set to the value of `tagging_message`.)
910

1011
## From v5 to v6

0 commit comments

Comments
 (0)