Skip to content

Commit

Permalink
文言をより一般的な形式に変更する (#95)
Browse files Browse the repository at this point in the history
* 文言をより一般的な形式に変更する

* commit messageはPRタイトルと同一にする

* update-package修正

* 適用先のPRのタイトルが展開されるようにする
  • Loading branch information
massongit authored Jul 29, 2022
1 parent 43116b5 commit 4e6447f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/update-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ jobs:
with:
github-token: ${{secrets.GITHUB_TOKEN}}
branch-name-prefix: fix-package
pr-title-prefix: package.jsonやpackage-lock.jsonを直してあげたよ!
pr-title-prefix: package.json, package-lock.json修正
pr-description-prefix: package.jsonやpackage-lock.jsonを修正しました。
repo-name: ${{ github.event.pull_request.head.repo.full_name }}
12 changes: 8 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ inputs:
pr-title-prefix:
description: 'Prefix of PR title'
required: true
pr-description-prefix:
description: 'Prefix of PR description'
required: true
repo-name:
description: 'Repository name'
required: true
Expand All @@ -36,7 +39,7 @@ runs:
EMAIL="41898282+github-actions[bot]@users.noreply.github.com"
git config user.email "${EMAIL}"
git add -u
git commit -m "鳩は唐揚げ!(自動で直してあげたよ!)"
git commit -m "${{inputs.pr-title-prefix}}"
REPO_URL="https://"
REPO_URL+="${{github.actor}}:${{inputs.github-token}}@github.com/"
REPO_URL+="${{github.repository}}.git"
Expand Down Expand Up @@ -99,11 +102,12 @@ runs:
github-token: ${{inputs.github-token}}
script: |
const HEAD_REF = process.env["HEAD_REF"]
let title = "${{inputs.pr-title-prefix}}PRをマージしてね!"
let body = "鳩の唐揚げおいしい!😋😋😋"
let title = "${{inputs.pr-title-prefix}}"
let body = "${{inputs.pr-description-prefix}}"
if ("${{github.event.pull_request.number}}" != "") {
body += " #${{github.event.pull_request.number}}"
body += "本PRをマージすると差分が次のPRに反映されます。\n"
body += "* #${{github.event.pull_request.number}}"
title += " #${{github.event.pull_request.number}}"
}
Expand Down

0 comments on commit 4e6447f

Please sign in to comment.