Skip to content

Commit

Permalink
feat: build for release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 10, 2022
1 parent fec1763 commit ebe7ac9
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 58 deletions.
55 changes: 28 additions & 27 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,33 +62,34 @@
![behavior](https://raw.githubusercontent.com/technote-space/toc-generator/images/screenshot.gif)

## オプション
| name | description | default | required | e.g. |
|:---|:---|:---|:---|:---|
|TARGET_PATHS|対象のファイルパス (カンマ区切り, [詳細](https://github.com/thlorenz/doctoc#adding-toc-to-individual-files))|`README*.md`|true|`README*.md,CHANGELOG.md`, `.`|
|TOC_TITLE|目次タイトル|`**Table of Contents**`| |`''`|
|MAX_HEADER_LEVEL|Heading最大レベル ([詳細](https://github.com/thlorenz/doctoc#specifying-a-maximum-heading-level-for-toc-entries))| | |`3`|
|CUSTOM_MODE|Customモードかどうか([生成例](samples/README.horizontal.md))|`false`| |`true`|
|CUSTOM_TEMPLATE|Customテンプレート(Customモード)|`<p align="center">${ITEMS}</p>`| | |
|ITEM_TEMPLATE|アイテムテンプレート(Customモード)|`<a href="${LINK}">${TEXT}</a>`| | |
|SEPARATOR|セパレータ(Customモード)|<code>\<span>&#124;\</span></code>| | |
|FOLDING|目次を折りたたみ式にするかどうか|`false`| |`true`|
|COMMIT_MESSAGE|コミットメッセージ|`chore(docs): update TOC`|true|`docs: update TOC`|
|COMMIT_NAME|コミット時に設定する名前|`${github.actor}`| | |
|COMMIT_EMAIL|コミット時に設定するメールアドレス|`${github.actor}@users.noreply.github.com`| | |
|CREATE_PR|プルリクエストを作成するかどうか|`false`| |`true`|
|CHECK_ONLY_DEFAULT_BRANCH|デフォルトのブランチのみをチェックするかどうか|`false`| |`true`|
|PR_BRANCH_PREFIX|プルリクエストのブランチプリフィックス|`toc-generator/`|true| |
|PR_BRANCH_NAME|プルリクエストのブランチ名<br>[Context variables](#context-variables)|`update-toc-${PR_ID}`|true|`toc-${PR_NUMBER}`|
|PR_TITLE|プルリクエストのタイトル<br>[Context variables](#context-variables)|`chore(docs): update TOC (${PR_MERGE_REF})`|true|`docs: update TOC`|
|PR_BODY|プルリクエストの本文<br>[Context PR variables](#context-pr-variables)|[action.yml](action.yml)|true| |
|PR_COMMENT_BODY|プルリクエストの本文(コメント用)<br>[Context PR variables](#context-pr-variables)|[action.yml](action.yml)| | |
|PR_CLOSE_MESSAGE|プルリクエストを閉じるときのメッセージ|`This PR has been closed because it is no longer needed.`| | |
|TARGET_BRANCH_PREFIX|ブランチ名のフィルタ| | |`release/`|
|INCLUDE_LABELS|プルリクエストに付与されているかチェックするラベル| | |`Label1, Label2`|
|OPENING_COMMENT|開始コメント (DocToc以外のため)|`<!-- toc `| | |
|CLOSING_COMMENT|終了コメント (DocToc以外のため)|`<!-- tocstop `| | |
|SKIP_COMMENT|スキップコメント| | |`<!-- toc skip `|
|GITHUB_TOKEN|アクセストークン|`${{github.token}}`|true|`${{secrets.ACCESS_TOKEN}}`|
| name | description | default | e.g. |
|:---|:---|:---|:---|
|TARGET_PATHS|対象のファイルパス (カンマ区切り, [詳細](https://github.com/thlorenz/doctoc#adding-toc-to-individual-files))|`README*.md`|`README*.md,CHANGELOG.md`, `.`|
|TOC_TITLE|目次タイトル|`**Table of Contents**`|`''`|
|MAX_HEADER_LEVEL|Heading最大レベル ([詳細](https://github.com/thlorenz/doctoc#specifying-a-maximum-heading-level-for-toc-entries))| |`3`|
|CUSTOM_MODE|Customモードかどうか([生成例](samples/README.horizontal.md))|`false`|`true`|
|CUSTOM_TEMPLATE|Customテンプレート(Customモード)|`<p align="center">${ITEMS}</p>`| |
|ITEM_TEMPLATE|アイテムテンプレート(Customモード)|`<a href="${LINK}">${TEXT}</a>`| |
|SEPARATOR|セパレータ(Customモード)|<code>\<span>&#124;\</span></code>| |
|FOLDING|目次を折りたたみ式にするかどうか|`false`|`true`|
|COMMIT_MESSAGE|コミットメッセージ|`chore(docs): update TOC`|`docs: update TOC`|
|COMMIT_NAME|コミット時に設定する名前|`${github.actor}`| |
|COMMIT_EMAIL|コミット時に設定するメールアドレス|`${github.actor}@users.noreply.github.com`| |
|CREATE_PR|プルリクエストを作成するかどうか|`false`|`true`|
|CHECK_ONLY_DEFAULT_BRANCH|デフォルトのブランチのみをチェックするかどうか|`false`|`true`|
|PR_BRANCH_PREFIX|プルリクエストのブランチプリフィックス|`toc-generator/`| |
|PR_BRANCH_NAME|プルリクエストのブランチ名<br>[Context variables](#context-variables)|`update-toc-${PR_ID}`|`toc-${PR_NUMBER}`|
|PR_TITLE|プルリクエストのタイトル<br>[Context variables](#context-variables)|`chore(docs): update TOC (${PR_MERGE_REF})`|`docs: update TOC`|
|PR_BODY|プルリクエストの本文<br>[Context PR variables](#context-pr-variables)|[action.yml](action.yml)| |
|PR_COMMENT_BODY|プルリクエストの本文(コメント用)<br>[Context PR variables](#context-pr-variables)|[action.yml](action.yml)| |
|PR_CLOSE_MESSAGE|プルリクエストを閉じるときのメッセージ|`This PR has been closed because it is no longer needed.`| |
|TARGET_BRANCH_PREFIX|ブランチ名のフィルタ| |`release/`|
|INCLUDE_LABELS|プルリクエストに付与されているかチェックするラベル| |`Label1, Label2`|
|OPENING_COMMENT|開始コメント (DocToc以外のため)|`<!-- toc `| |
|CLOSING_COMMENT|終了コメント (DocToc以外のため)|`<!-- tocstop `| |
|SKIP_COMMENT|スキップコメント| |`<!-- toc skip `|
|GITHUB_TOKEN|アクセストークン|`${{github.token}}`|`${{secrets.ACCESS_TOKEN}}`|
|SIGNOFF| Signed-off-byを付与 | |`true`|

### 個別に指定
[doctoc](https://github.com/technote-space/doctoc#example) に使用されているオプションはコメントで値を指定することが可能です。
Expand Down
55 changes: 28 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,33 +63,34 @@ e.g. `README.md`
![behavior](https://raw.githubusercontent.com/technote-space/toc-generator/images/screenshot.gif)

## Options
| name | description | default | required | e.g. |
|:---|:---|:---|:---|:---|
|TARGET_PATHS|Target file path. (Comma separated, [Detail](https://github.com/thlorenz/doctoc#adding-toc-to-individual-files))|`README*.md`|true|`README*.md,CHANGELOG.md`, `.`|
|TOC_TITLE|TOC Title|`**Table of Contents**`| |`''`|
|MAX_HEADER_LEVEL|Maximum heading level. ([Detail](https://github.com/thlorenz/doctoc#specifying-a-maximum-heading-level-for-toc-entries))| | |`3`|
|CUSTOM_MODE|Whether it is custom mode([Generated Example](samples/README.horizontal.md))|`false`| |`true`|
|CUSTOM_TEMPLATE|Custom template for custom mode|`<p align="center">${ITEMS}</p>`| | |
|ITEM_TEMPLATE|Item template for custom mode|`<a href="${LINK}">${TEXT}</a>`| | |
|SEPARATOR|Separator for custom mode|<code>\<span>&#124;\</span></code>| | |
|FOLDING|Whether to make TOC foldable|`false`| |`true`|
|COMMIT_MESSAGE|Commit message|`chore(docs): update TOC`|true|`docs: update TOC`|
|COMMIT_NAME|Git commit name|`${github.actor}`| | |
|COMMIT_EMAIL|Git commit email|`${github.actor}@users.noreply.github.com`| | |
|CREATE_PR|Whether to create PullRequest|`false`| |`true`|
|CHECK_ONLY_DEFAULT_BRANCH|Whether to check only default branch|`false`| |`true`|
|PR_BRANCH_PREFIX|PullRequest branch prefix|`toc-generator/`|true| |
|PR_BRANCH_NAME|PullRequest branch name<br>[Context variables](#context-variables)|`update-toc-${PR_ID}`|true|`toc-${PR_NUMBER}`|
|PR_TITLE|PullRequest title<br>[Context variables](#context-variables)|`chore(docs): update TOC (${PR_MERGE_REF})`|true|`docs: update TOC`|
|PR_BODY|PullRequest body<br>[Context PR variables](#context-pr-variables)|[action.yml](action.yml)|true| |
|PR_COMMENT_BODY|PullRequest body for comment<br>[Context PR variables](#context-pr-variables)|[action.yml](action.yml)| | |
|PR_CLOSE_MESSAGE|Message body when closing PullRequest|`This PR has been closed because it is no longer needed.`| | |
|TARGET_BRANCH_PREFIX|Filter by branch name| | |`release/`|
|INCLUDE_LABELS|Labels used to check if the PullRequest has it| | |`Label1, Label2`|
|OPENING_COMMENT|Opening comment (for other than DocToc)|`<!-- toc `| | |
|CLOSING_COMMENT|Closing comment (for other than DocToc)|`<!-- tocstop `| | |
|SKIP_COMMENT|Skip comment| | |`<!-- toc skip `|
|GITHUB_TOKEN|Access token|`${{github.token}}`|true|`${{secrets.ACCESS_TOKEN}}`|
| name | description | default | e.g. |
|:---|:---|:---|:---|
|TARGET_PATHS|Target file path. (Comma separated, [Detail](https://github.com/thlorenz/doctoc#adding-toc-to-individual-files))|`README*.md`|`README*.md,CHANGELOG.md`, `.`|
|TOC_TITLE|TOC Title|`**Table of Contents**`|`''`|
|MAX_HEADER_LEVEL|Maximum heading level. ([Detail](https://github.com/thlorenz/doctoc#specifying-a-maximum-heading-level-for-toc-entries))| |`3`|
|CUSTOM_MODE|Whether it is custom mode([Generated Example](samples/README.horizontal.md))|`false`|`true`|
|CUSTOM_TEMPLATE|Custom template for custom mode|`<p align="center">${ITEMS}</p>`| |
|ITEM_TEMPLATE|Item template for custom mode|`<a href="${LINK}">${TEXT}</a>`| |
|SEPARATOR|Separator for custom mode|<code>\<span>&#124;\</span></code>| |
|FOLDING|Whether to make TOC foldable|`false`|`true`|
|COMMIT_MESSAGE|Commit message|`chore(docs): update TOC`|`docs: update TOC`|
|COMMIT_NAME|Git commit name|`${github.actor}`| |
|COMMIT_EMAIL|Git commit email|`${github.actor}@users.noreply.github.com`| |
|CREATE_PR|Whether to create PullRequest|`false`|`true`|
|CHECK_ONLY_DEFAULT_BRANCH|Whether to check only default branch|`false`|`true`|
|PR_BRANCH_PREFIX|PullRequest branch prefix|`toc-generator/`| |
|PR_BRANCH_NAME|PullRequest branch name<br>[Context variables](#context-variables)|`update-toc-${PR_ID}`|`toc-${PR_NUMBER}`|
|PR_TITLE|PullRequest title<br>[Context variables](#context-variables)|`chore(docs): update TOC (${PR_MERGE_REF})`|`docs: update TOC`|
|PR_BODY|PullRequest body<br>[Context PR variables](#context-pr-variables)|[action.yml](action.yml)| |
|PR_COMMENT_BODY|PullRequest body for comment<br>[Context PR variables](#context-pr-variables)|[action.yml](action.yml)| |
|PR_CLOSE_MESSAGE|Message body when closing PullRequest|`This PR has been closed because it is no longer needed.`| |
|TARGET_BRANCH_PREFIX|Filter by branch name| |`release/`|
|INCLUDE_LABELS|Labels used to check if the PullRequest has it| |`Label1, Label2`|
|OPENING_COMMENT|Opening comment (for other than DocToc)|`<!-- toc `| |
|CLOSING_COMMENT|Closing comment (for other than DocToc)|`<!-- tocstop `| |
|SKIP_COMMENT|Skip comment| |`<!-- toc skip `|
|GITHUB_TOKEN|Access token|`${{github.token}}`|`${{secrets.ACCESS_TOKEN}}`|
|SIGNOFF| Add `Signed-off-by` line | |`true`|

### Specify options individually
The options used for [doctoc](https://github.com/technote-space/doctoc#example) can be commented to specify values.
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ inputs:
API_TOKEN:
description: Secret GitHub API token used to make API requests.
required: false
SIGNOFF:
description: 'Add `Signed-off-by` line by the committer at the end of the commit log message.'
required: false

TARGET_PATHS:
description: Target file path. (Comma separated, @see https://github.com/thlorenz/doctoc#adding-toc-to-individual-files)
Expand Down
2 changes: 1 addition & 1 deletion build.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"owner":"technote-space","repo":"toc-generator","sha":"9ce7963dfdc62db525f845568ac92926033caebb","ref":"refs/tags/test/v4.3.0.3661516251","tagName":"test/v4.3.0.3661516251","branch":"gh-actions","tags":["test/v4.3.0.3661516251","test/v4.3.0","test/v4.3","test/v4"],"updated_at":"2022-12-09T23:31:12.544Z"}
{"owner":"technote-space","repo":"toc-generator","sha":"FETCH_HEAD","ref":"refs/heads/master","tagName":"test/v4.2.3","branch":"gh-actions","tags":["test/v4.2.3","test/v4.2","test/v4"],"updated_at":"2022-12-10T09:34:16.059Z"}
1 change: 1 addition & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -123340,6 +123340,7 @@ const getRunnerArguments = () => {
targetEvents: TARGET_EVENTS,
notCreatePr: !utils$l.getBoolValue(coreExports.getInput('CREATE_PR')),
checkOnlyDefaultBranch: utils$l.getBoolValue(coreExports.getInput('CHECK_ONLY_DEFAULT_BRANCH')),
signoff: utils$l.getBoolValue(coreExports.getInput('SIGNOFF')),
};
};
// eslint-disable-next-line no-magic-numbers
Expand Down
6 changes: 3 additions & 3 deletions node_modules/.yarn-integrity

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ebe7ac9

Please sign in to comment.