Skip to content

Commit

Permalink
[feature] Add customizable commit message
Browse files Browse the repository at this point in the history
[build] Add `@zeit/ncc` dev package and basic build command
[readme] Update README with action input descriptions
  • Loading branch information
jasondantuma committed Aug 3, 2020
1 parent 798ef08 commit 4340078
Show file tree
Hide file tree
Showing 6 changed files with 7,888 additions and 7,832 deletions.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,32 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: everlytic/branch-merge@1.0.2
- uses: everlytic/branch-merge@1.1.0
with:
github_token: ${{ github.token }}
source_ref: ${{ github.ref }}
target_branch: 'master'
commit_message_template: '[Automated] Merged {source_ref} into target {target_branch}'
```
## Inputs
### `github_token`
**Required** - The GitHub Personal Access Token used to perform the merge action.
This can be the [Token provided by GitHub Workflows](https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token),
or a custom token set at a [workflow secret](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets).

A custom token may be useful if performing actions that require Administrative privileges, such as overriding
branch protection rules.

### `source_ref`
**Required** - The source ref or branch name that you wish to merge into the `target_branch`.

### `target_branch`
**Required** - The target branch you are merging into.

### `commit_message_template`
**Optional** - Customize the commit message that gets added to the merge commit. This allows for templates enclosed in
curly braces `{}`.

The only templates allowed at this time are `{source_ref}` and `{target_branch}`.
10 changes: 7 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@ name: 'Branch Merge'
description: 'Merges a source branch, or SHA1 ref into a target branch'
inputs:
github_token:
description: 'Token to authenticate with GitHub'
description: 'Token used to authenticate with GitHub when performing the merge command.'
required: true
default: ${{ github.token }}
source_ref:
description: 'Branch or SHA1 ref that you are merging into the target_branch.'
description: 'Branch name or Ref that you wish to merge into the target_branch.'
required: true
default: ${{ github.ref }}
target_branch:
description: 'Branch you are merging into'
description: 'Branch you are merging the source ref into.'
required: true
commit_message_template:
description: 'Template to generate the commit message, see README.md for more info'
required: false
default: 'Merged {source_ref} into {target_branch}.'
runs:
using: 'node12'
main: 'dist/index.js'
Expand Down
Loading

0 comments on commit 4340078

Please sign in to comment.