Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add PR_BODY option #80

Merged
merged 5 commits into from
Aug 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ inputs:
description: |
Labels which will be added to the pull request. Defaults to sync. Set to false to turn off
required: false
PR_BODY:
description: |
Additional content to add in the PR description. Defaults to ''
required: false
ASSIGNEES:
description: |
People to assign to the pull request. Defaults to none
Expand Down
6 changes: 5 additions & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ try {
type: 'array',
disableable: true
}),
PR_BODY: getInput({
key: 'PR_BODY',
default: ''
}),
ASSIGNEES: getInput({
key: 'ASSIGNEES',
type: 'array'
Expand Down Expand Up @@ -209,4 +213,4 @@ const parseConfig = async () => {
module.exports = {
...context,
parseConfig
}
}
5 changes: 4 additions & 1 deletion src/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const {
COMMIT_PREFIX,
GITHUB_REPOSITORY,
OVERWRITE_EXISTING_PR,
PR_BODY,
BRANCH_PREFIX
} = require('./config')

Expand Down Expand Up @@ -194,6 +195,8 @@ class Git {
const body = dedent(`
Synced local file(s) with [${ GITHUB_REPOSITORY }](https://github.com/${ GITHUB_REPOSITORY }).

${ PR_BODY }
dhruvkb marked this conversation as resolved.
Show resolved Hide resolved

${ changedFiles }

---
Expand Down Expand Up @@ -249,4 +252,4 @@ class Git {
}
}

module.exports = Git
module.exports = Git