Skip to content

Commit

Permalink
feat(action): Add extra args input to action
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Feb 24, 2023
1 parent 1893de9 commit 10b544a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ jobs:
- name: Run Committed
uses: ./
with:
args: "-vv --no-merge-commit"
commits: "HEAD~..HEAD^2"
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ author: "Ed Page"
description: "Run committed to check commit history"

inputs:
args:
description: "arguments for committed"
required: false
default: "-vv"
commits:
description: "commit range to check"
required: false
Expand All @@ -12,6 +16,7 @@ runs:
using: "docker"
image: "docker/Dockerfile"
args:
- ${{ inputs.args }}
- ${{ inputs.commits }}

branding:
Expand Down
3 changes: 2 additions & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ log() {
}

CMD_NAME="committed"
args="${@:1:$#-1}"
commits="${@: -1}"

if [[ -z $(which ${CMD_NAME} 2>/dev/null) ]]; then
Expand All @@ -26,4 +27,4 @@ echo ""
echo "If this fails, don't sweat it. We're trying to encourage clear communication and not hinder contributions."
echo "If it is a reasonable issue and you lack time or feel uncomfortable fixing it yourself,"
echo "let us know and we can mentor or fix it."
${COMMAND} --color=always -vv "${commits}"
${COMMAND} --color=always "${args}" "${commits}"

0 comments on commit 10b544a

Please sign in to comment.