Read this in other languages: English, 日本語.
This is a GitHub Actions
to add commit history to PR body.
Part of the body of this PR (enclosed in red) is automatically generated by the merged PRs (enclosed in green) and commits (enclosed in blue).
- Setup workflow
e.g.on: pull_request: types: [opened, synchronize] name: Pull Request updated jobs: history: name: Pull Request Body runs-on: ubuntu-latest if: startsWith(github.event.pull_request.head.ref, 'release/') steps: - name: Pull Request Body uses: technote-space/pr-commit-body-action@v1
- Create pull request including comment below
<!-- START pr-commits --> <!-- END pr-commits -->
name | description | default | required | e.g. |
---|---|---|---|---|
CHANGE_TEMPLATE | Merge item template | * ${TITLE} (#${NUMBER}) @${AUTHOR} |
- ${TITLE} |
|
COMMIT_TEMPLATE | Commit template | * ${MESSAGE} (${COMMITS}) |
- ${MESSAGE} |
|
MAX_COMMITS | Max number to show commits | 5 |
3 |
|
TEMPLATE | Template | ${MERGES} ${COMMITS} ${BREAKING_CHANGES} |
true | ${MERGES} |
COMMIT_TYPES | Types | feat, fix, build, ci, docs, style, perf, refactor, test, chore |
true | feat, fix, chore |
EXCLUDE_MESSAGES | Exclude messages | tweaks |
||
TITLE | Title | Changes: |
||
NO_ITEMS | Message to show if there are no item | - no item |
||
LINK_ISSUE_KEYWORD | A keyword linking a pull request to issue. If this options is set, this value is added to issue references. (e.g. #234 => closes #123 ) |
closes |
||
FILTER_PR | Whether to filter pull requests by semantic message rule | false |
true |
|
GITHUB_TOKEN | Access token | ${{github.token}} |
true | ${{secrets.ACCESS_TOKEN}} |
eventName | action |
---|---|
pull_request, pull_request_target | opened, reopened, synchronize |