Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
feat: Build for release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 27, 2020
1 parent a10fc6a commit 7c88a02
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 7 deletions.
28 changes: 28 additions & 0 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
- [スクリーンショット](#%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)
- [使用方法](#%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95)
- [動作](#%E5%8B%95%E4%BD%9C)
- [出力](#%E5%87%BA%E5%8A%9B)
- [diff](#diff)
- [count](#count)
- [insertions](#insertions)
- [deletions](#deletions)
- [lines](#lines)
- [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)
Expand Down Expand Up @@ -120,6 +126,28 @@ jobs:
/home/runner/work/my-repo-name/my-repo-name/src/main.ts /home/runner/work/my-repo-name/my-repo-name/src/utils/command.ts
```

## 出力
### diff
差分のあるファイルの結果
もし `SET_ENV_NAME` が設定されている場合、その名前で環境変数が設定されます。
default: `SET_ENV_NAME=GIT_DIFF`
### count
差分のあるファイル数
もし `SET_ENV_NAME_COUNT` が設定されている場合、その名前で環境変数が設定されます。
default: `SET_ENV_NAME_COUNT=`
### insertions
追加された行数
もし `SET_ENV_NAME_INSERTIONS` が設定されている場合、その名前で環境変数が設定されます。
default: `SET_ENV_NAME_INSERTIONS=`
### deletions
削除された行数
もし `SET_ENV_NAME_DELETIONS` が設定されている場合、その名前で環境変数が設定されます。
default: `SET_ENV_NAME_DELETIONS=`
### lines
追加された行数と削除された行数の和
もし `SET_ENV_NAME_LINES` が設定されている場合、その名前で環境変数が設定されます。
default: `SET_ENV_NAME_LINES=`

## Action イベント詳細
### 対象イベント
| eventName | action |
Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ GitHub actions to get git diff.
- [Screenshots](#screenshots)
- [Usage](#usage)
- [Behavior](#behavior)
- [Outputs](#outputs)
- [diff](#diff)
- [count](#count)
- [insertions](#insertions)
- [deletions](#deletions)
- [lines](#lines)
- [Action event details](#action-event-details)
- [Target events](#target-events)
- [Author](#author)
Expand Down Expand Up @@ -119,6 +125,28 @@ If there is no difference in the source code below, this workflow will skip the
/home/runner/work/my-repo-name/my-repo-name/src/main.ts /home/runner/work/my-repo-name/my-repo-name/src/utils/command.ts
```

## Outputs
### diff
The results of diff file names.
if inputs `SET_ENV_NAME` is set, an environment variable is set with that name.
default: `SET_ENV_NAME=GIT_DIFF`
### count
The number of diff files.
if inputs `SET_ENV_NAME_COUNT` is set, an environment variable is set with that name.
default: `SET_ENV_NAME_COUNT=`
### insertions
The number of insertions lines.
if inputs `SET_ENV_NAME_INSERTIONS` is set, an environment variable is set with that name.
default: `SET_ENV_NAME_INSERTIONS=`
### deletions
The number of deletions lines.
if inputs `SET_ENV_NAME_DELETIONS` is set, an environment variable is set with that name.
default: `SET_ENV_NAME_DELETIONS=`
### lines
The number of diff lines.
if inputs `SET_ENV_NAME_LINES` is set, an environment variable is set with that name.
default: `SET_ENV_NAME_LINES=`

## Action event details
### Target events
| eventName | action |
Expand Down
10 changes: 5 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ inputs:

outputs:
diff:
description: 'The results of diff file names (if SET_ENV_NAME is set)'
description: The results of diff file names.
count:
description: 'The number of diff files (if SET_ENV_NAME_COUNT is set)'
description: The number of diff files.
insertions:
description: 'The number of insertions lines (if SET_ENV_NAME_INSERTIONS is set)'
description: The number of insertions lines.
deletions:
description: 'The number of deletions lines (if SET_ENV_NAME_DELETIONS is set)'
description: The number of deletions lines.
lines:
description: 'The number of diff lines (if SET_ENV_NAME_LINES is set)'
description: The number of diff lines.

branding:
# https://feathericons.com/
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":"get-diff-action","sha":"61c48c1c98de342882c982357069bcffa395b58c","ref":"refs/tags/v1.1.0","tagName":"v1.1.0","branch":"gh-actions","tags":["v1","v1.1","v1.1.0"],"updated_at":"2020-01-27T06:02:20.618Z"}
{"owner":"technote-space","repo":"get-diff-action","sha":"2bb09aead0ba50c93e021e67723d40ee8a99d60d","ref":"refs/tags/v1.1.1","tagName":"v1.1.1","branch":"gh-actions","tags":["v1","v1.1","v1.1.1"],"updated_at":"2020-01-27T06:54:48.183Z"}
2 changes: 1 addition & 1 deletion lib/utils/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ exports.getGitDiff = () => __awaiter(void 0, void 0, void 0, function* () {
.map((item) => {
const prefixMatched = isPrefixMatched(item, prefix);
const suffixMatched = isSuffixMatched(item, suffix);
const filterIgnored = !(prefixMatched && suffixMatched) && isFilterIgnored(item, files);
const filterIgnored = isFilterIgnored(item, files);
return { file: item, filterIgnored, prefixMatched, suffixMatched };
})
.filter(item => item.filterIgnored || (item.prefixMatched && item.suffixMatched))
Expand Down

0 comments on commit 7c88a02

Please sign in to comment.