https://github.com/technote-space/pr-commit-body-action
GitHub action to add commit history to PR body
https://github.com/technote-space/pr-commit-body-action
github-actions
Last synced: about 1 year ago
JSON representation
GitHub action to add commit history to PR body
- Host: GitHub
- URL: https://github.com/technote-space/pr-commit-body-action
- Owner: technote-space
- License: mit
- Created: 2020-02-13T05:32:28.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2023-12-24T09:06:07.000Z (over 2 years ago)
- Last Synced: 2024-10-14T14:05:21.334Z (over 1 year ago)
- Topics: github-actions
- Language: TypeScript
- Homepage:
- Size: 7.93 MB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.ja.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# PR Commit Body Action
[](https://github.com/technote-space/pr-commit-body-action/actions)
[](https://codecov.io/gh/technote-space/pr-commit-body-action)
[](https://www.codefactor.io/repository/github/technote-space/pr-commit-body-action)
[](https://github.com/technote-space/pr-commit-body-action/blob/master/LICENSE)
*Read this in other languages: [English](README.md), [日本語](README.ja.md).*
プルリクエスト本文にコミット履歴を追加する`GitHub Actions`です。
## Table of Contents
Details
- [スクリーンショット](#%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88)
- [自動生成された本文](#%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%95%E3%82%8C%E3%81%9F%E6%9C%AC%E6%96%87)
- [使用方法](#%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95)
- [Options](#options)
- [Action イベント詳細](#action-%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88%E8%A9%B3%E7%B4%B0)
- [対象イベント](#%E5%AF%BE%E8%B1%A1%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88)
- [Author](#author)
## スクリーンショット
### 自動生成された本文

このプルリクエストの本文の一部(赤で囲まれている箇所)は、マージされたPR(緑で囲まれている箇所)とコミット(青で囲まれている箇所)によって自動的に生成されています。
## 使用方法
1. ワークフローを設定
例:
```yaml
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
```
1. 以下のコメントを含むプルリクエストを作成
```markdown
```
## Options
| name | description | default | required | e.g. |
|:---:|:---|:---:|:---:|:---:|
|CHANGE_TEMPLATE|マージされたプルリク用テンプレート|`* ${TITLE} (#${NUMBER}) @${AUTHOR}`| |`- ${TITLE}`|
|COMMIT_TEMPLATE|コミット用テンプレート|`* ${MESSAGE} (${COMMITS})`| |`- ${MESSAGE}`|
|MAX_COMMITS|最大コミット表示数|`5`| |`3`|
|TEMPLATE|テンプレート|`${MERGES}`
`${COMMITS}`
`${BREAKING_CHANGES}`|true|`${MERGES}`|
|COMMIT_TYPES|コミットタイプ|`feat, fix, build, ci, docs, style, perf, refactor, test, chore`|true|`feat, fix, chore`|
|EXCLUDE_MESSAGES|除外メッセージ| | |`tweaks`|
|TITLE|タイトル| | |`Changes:`|
|NO_ITEMS|アイテムがない時に表示するメッセージ| | |`- no item`|
|LINK_ISSUE_KEYWORD|プルリクエストを Issue に紐付けるためのキーワード
このオプションが設定されている場合、この値が Issue 参照に付与されます。
(例:` #234` => ` closes #123`)| | |`closes`|
|FILTER_PR|Semantic message のルールでプルリクエストをフィルタするかどうか|`false`| |`true`|
|GITHUB_TOKEN|アクセストークン|`${{github.token}}`|true|`${{secrets.ACCESS_TOKEN}}`|
## Action イベント詳細
### 対象イベント
| eventName | action |
|:---:|:---:|
|pull_request, pull_request_target|opened, reopened, synchronize|
## Author
[GitHub (Technote)](https://github.com/technote-space)
[Blog](https://technote.space)