Skip to content
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
24 changes: 5 additions & 19 deletions .github/workflows/check_pr_scope.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

- name: Get PR title
id: pr_title
run: |

Check warning on line 22 in .github/workflows/check_pr_scope.yml

View workflow job for this annotation

GitHub Actions / action-lint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:3:24: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/check_pr_scope.yml:22:9: shellcheck reported issue in this script: SC2086:info:3:24: Double quote to prevent globbing and word splitting [shellcheck]
title=$(jq -r .pull_request.title "$GITHUB_EVENT_PATH")
echo "$title"
echo "title=$title" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -59,24 +59,10 @@
permissions:
pull-requests: write
steps:
- name: Set comment body
id: set_comment_body
run: |
{
echo 'comment_body<<EOF'
echo "PRのスコープが正しくありません。\n現在のスコープ: ${{ needs.check_scope.outputs.pr_scopes }}\n検知したスコープ: ${{ needs.check_scope.outputs.required_scopes }}"
echo 'EOF'
} >> $GITHUB_OUTPUT

- name: Comment on PR
uses: actions/github-script@v7
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const body = `${{ steps.set_comment_body.outputs.comment_body }}`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
});
message: |
PRのスコープが正しくありません。
現在のスコープ: ${{ needs.check_scope.outputs.pr_scopes }}
検知したスコープ: ${{ needs.check_scope.outputs.required_scopes }}
Loading