From 07782f3a3c3e5a61ade4d97a562ccc25bb46b03b Mon Sep 17 00:00:00 2001 From: Hiroyuki Kusu Date: Thu, 6 Jun 2024 12:53:36 +0900 Subject: [PATCH] Add bullet option --- README.md | 2 ++ action.yml | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1fc8cc0..fa1a7eb 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/action.yml b/action.yml index ad7c781..acf8981 100644 --- a/action.yml +++ b/action.yml @@ -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 @@ -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: | @@ -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