From 2d6af5fa664a96195db80f972fad6f8a03812f08 Mon Sep 17 00:00:00 2001 From: BetaHuhn Date: Sat, 19 Feb 2022 11:45:51 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20documentation=20about=20PR?= =?UTF-8?q?=5FBODY=20input=20(#175)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 3e7599e3..5141a8af 100644 --- a/README.md +++ b/README.md @@ -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 | @@ -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.