Skip to content

Commit

Permalink
📝 Add documentation about PR_BODY input (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
BetaHuhn committed Feb 19, 2022
1 parent b09aed4 commit 2d6af5f
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ Here are all the inputs [repo-file-sync-action](https://github.com/BetaHuhn/repo
| `TEAM_REVIEWERS` | Teams to request a review of the pull request from | **No** | N/A |
| `COMMIT_PREFIX` | Prefix for commit message and pull request title | **No** | 🔄 |
| `COMMIT_BODY` | Commit message body. Will be appended to commit message, separated by two line returns. | **No** | '' |
| `PR_BODY` | Additional content to add in the PR description. | **No** | '' |
| `ORIGINAL_MESSAGE` | Use original commit message instead. Only works if the file(s) were changed and the action was triggered by pushing a single commit. | **No** | false |
| `COMMIT_AS_PR_TITLE` | Use first line of the commit message as PR title. Only works if `ORIGINAL_MESSAGE` is `true` and working. | **No** | false |
| `COMMIT_EACH_FILE` | Commit each file seperately | **No** | true |
Expand Down Expand Up @@ -409,6 +410,34 @@ The above example would result in a commit message that looks something like thi
Change-type: patch
```

### Add content to the PR body

You can add more content to the PR body with the `PR_BODY` option. For example:

**.github/workflows/sync.yml**

```yml
- name: Run GitHub File Sync
uses: BetaHuhn/repo-file-sync-action@v1
with:
GH_PAT: ${{ secrets.GH_PAT }}
PR_BODY: This is your custom PR Body
```

It will be added below the first line of the body and above the list of changed files. The above example would result in a PR body that looks something like this:

```
Synced local file(s) with GITHUB_REPOSITORY.
This is your custom PR Body
▶ Changed files
---
This PR was created automatically by the repo-file-sync-action workflow run xxx.
```

### Fork and pull request workflow

If you do not wish to grant this action write access to target repositories, you can specify a bot/user Github acccount that you do have access to with the `FORK` parameter.
Expand Down

0 comments on commit 2d6af5f

Please sign in to comment.