Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support -h|--help option #97

Merged
merged 3 commits into from
Nov 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion gh-act
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@
echo "gh-act version ${GH_ACT_VERSION}"
CREATE_EVENT_JSON=false
;;
-g| --graph| -h| --help| -l| --list)
-g| --graph| -l| --list)
CREATE_EVENT_JSON=false
srz-zumix marked this conversation as resolved.
Show resolved Hide resolved
;;
-h| --help)
EVENT_NAME=help
srz-zumix marked this conversation as resolved.
Show resolved Hide resolved
CREATE_EVENT_JSON=false
;;
-?*) ;;
Expand Down Expand Up @@ -439,7 +443,7 @@
BEFORE=$(gh pr view "${PULL_REQUEST_SPEC}" --json commits --jq .commits[].oid | tail -2 | head -1)
# shellcheck disable=SC2046
read -r HEAD HEAD_USER <<< $(gh pr view "${PULL_REQUEST_SPEC}" --json commits \
--template '{{- $last := 0}}

Check warning on line 446 in gh-act

View workflow job for this annotation

GitHub Actions / shellcheck

[shellcheck] reported by reviewdog 🐶 Expressions don't expand in single quotes, use double quotes for that. [SC2016](https://github.com/koalaman/shellcheck/wiki/SC2016) Raw Output: ./gh-act:446:20:info:Expressions don't expand in single quotes, use double quotes for that. [SC2016](https://github.com/koalaman/shellcheck/wiki/SC2016)
{{- range $index, $element := .commits}}{{$last = $index}}{{end}}
{{- $commit := index .commits $last}}
{{- $author := index $commit.authors 0}}
Expand Down
Loading