From 2a8cc50ba0ad863ef60d42878913ca92ce8a5bef Mon Sep 17 00:00:00 2001 From: nrslib <38722970+nrslib@users.noreply.github.com> Date: Sat, 28 Feb 2026 13:29:22 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20cc-resolve=20=E3=81=A7=E3=83=95=E3=82=A9?= =?UTF-8?q?=E3=83=BC=E3=82=AFPR=E3=82=92=E3=82=B9=E3=82=AD=E3=83=83?= =?UTF-8?q?=E3=83=97=E3=81=97=E3=80=81=E5=90=8C=E4=B8=80=E3=83=AA=E3=83=9D?= =?UTF-8?q?=E3=82=B8=E3=83=88=E3=83=AAPR=E3=81=AE=E3=81=BF=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cc-resolve.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cc-resolve.yml b/.github/workflows/cc-resolve.yml index 82a630f..9a4b95d 100644 --- a/.github/workflows/cc-resolve.yml +++ b/.github/workflows/cc-resolve.yml @@ -27,10 +27,19 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Get PR branch + - name: Check if fork PR id: pr run: | - echo "branch=$(gh pr view ${{ github.event.issue.number }} --repo ${{ github.repository }} --json headRefName -q .headRefName)" >> "$GITHUB_OUTPUT" + PR_REPO=$(gh pr view ${{ github.event.issue.number }} --repo ${{ github.repository }} \ + --json headRepositoryOwner,headRepository \ + --jq '"\(.headRepositoryOwner.login)/\(.headRepository.name)"') + BRANCH=$(gh pr view ${{ github.event.issue.number }} --repo ${{ github.repository }} \ + --json headRefName -q .headRefName) + echo "branch=${BRANCH}" >> "$GITHUB_OUTPUT" + if [ "$PR_REPO" != "${{ github.repository }}" ]; then + echo "::error::Fork PR はサポートしていません。contributor 側で解決してください。" + exit 1 + fi env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}