Skip to content

Commit

Permalink
Merge pull request #7 from yumemi-inc/add_option
Browse files Browse the repository at this point in the history
Add bullet option
  • Loading branch information
hkusu authored Jun 6, 2024
2 parents 9eccd48 + 07782f3 commit cf85e4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ If you want to output in JSON or Markdown instead of plain text like above, spec
format: 'json' # or markdown
```

If you want to change the bullets in a list in Markdown format, specify `bullet` input (default is `- #`).

By default, list pull requests associated with merge commits.
To list pull requests associated with all commits, specify `true` for `merge-commit-only` input.
However, in this case, more pull requests can be detected, but the number of API calls will increase, so be careful when using it when the commit history is long.
Expand Down
7 changes: 6 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ inputs:
description: 'Output format for list of pull request numbers. One of plain, json, markdown.'
required: false
default: 'plain'
bullet:
description: 'Bullets for list of pull request numbers in markdown format.'
required: false
default: '- #'
merge-commit-only:
description: 'List pull requests associated with merge commits only.'
required: false
Expand Down Expand Up @@ -56,6 +60,7 @@ runs:
PARENTS_MIN_LENGTH: ${{ inputs.merge-commit-only != 'false' && '2' || '1' }}
HEAD_PR_NUMBER: ${{ github.event.pull_request.number || '-1' }}
FORMAT: ${{ inputs.format }}
BULLET: ${{ inputs.bullet }}
GH_REPO: ${{ github.repository }} # for GitHub CLI
GH_TOKEN: ${{ github.token }} # for GitHub CLI
run: |
Expand Down Expand Up @@ -93,7 +98,7 @@ runs:
delimiter="$(openssl rand -hex 8)"
echo "numbers<<$delimiter"
for pr_number in $unique_pr_number_list ; do
echo "- #${pr_number}"
echo "${BULLET}${pr_number}"
done
echo "$delimiter"
else
Expand Down

0 comments on commit cf85e4e

Please sign in to comment.