diff --git a/.github/workflows/pr-merge-develop-hato-bot.yml b/.github/workflows/pr-merge-develop-hato-bot.yml index 3ba792ce40..24c894c8cf 100644 --- a/.github/workflows/pr-merge-develop-hato-bot.yml +++ b/.github/workflows/pr-merge-develop-hato-bot.yml @@ -13,18 +13,9 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: fetch-depth: 0 - - name: Set org name - uses: actions/github-script@v7.0.1 - id: set_org_name - with: - github-token: ${{secrets.GITHUB_TOKEN}} - result-encoding: string - script: return process.env.GITHUB_REPOSITORY.split('/')[0] - name: Get PullRequests uses: actions/github-script@v7.0.1 id: get_pull_requests - env: - ORG_NAME: ${{steps.set_org_name.outputs.result}} with: github-token: ${{secrets.GITHUB_TOKEN}} script: | @@ -33,8 +24,6 @@ jobs: - name: Create PullRequest uses: actions/github-script@v7.0.1 if: ${{ steps.get_pull_requests.outputs.result == 0 }} - env: - ORG_NAME: ${{steps.set_org_name.outputs.result}} with: github-token: ${{secrets.GITHUB_TOKEN}} script: | diff --git a/.github/workflows/pr-release-hato-bot.yml b/.github/workflows/pr-release-hato-bot.yml index 8c947b9c4c..8825e7ffe1 100644 --- a/.github/workflows/pr-release-hato-bot.yml +++ b/.github/workflows/pr-release-hato-bot.yml @@ -15,19 +15,10 @@ jobs: - name: Get diff id: get_diff run: bash "${GITHUB_WORKSPACE}/scripts/pr_release_hato_bot/pr_release/get_diff.sh" - - name: Set org name - uses: actions/github-script@v7.0.1 - id: set_org_name - with: - github-token: ${{secrets.GITHUB_TOKEN}} - result-encoding: string - script: return process.env.GITHUB_REPOSITORY.split('/')[0] - name: Get PullRequests uses: actions/github-script@v7.0.1 if: ${{ steps.get_diff.outputs.result != '' }} id: get_pull_requests - env: - ORG_NAME: ${{steps.set_org_name.outputs.result}} with: github-token: ${{secrets.GITHUB_TOKEN}} script: | @@ -36,8 +27,6 @@ jobs: - name: Create PullRequest uses: actions/github-script@v7.0.1 if: ${{ steps.get_diff.outputs.result != '' && steps.get_pull_requests.outputs.result == 0 }} - env: - ORG_NAME: ${{steps.set_org_name.outputs.result}} with: github-token: ${{secrets.GITHUB_TOKEN}} script: | diff --git a/scripts/get_pull_requests_hato_bot.js b/scripts/get_pull_requests_hato_bot.js index 62ea4812d5..82a259bc67 100644 --- a/scripts/get_pull_requests_hato_bot.js +++ b/scripts/get_pull_requests_hato_bot.js @@ -2,7 +2,7 @@ module.exports = async ({ github, context }) => { const pullsListParams = { owner: context.repo.owner, repo: context.repo.repo, - head: process.env.ORG_NAME + ':develop', + head: context.repo.owner + ':develop', base: 'master', state: 'open' } diff --git a/scripts/pr_merge_develop_hato_bot/pr_master_to_develop/create_pull_request.js b/scripts/pr_merge_develop_hato_bot/pr_master_to_develop/create_pull_request.js index d8f86b3cd5..3bbc8aa6e1 100644 --- a/scripts/pr_merge_develop_hato_bot/pr_master_to_develop/create_pull_request.js +++ b/scripts/pr_merge_develop_hato_bot/pr_master_to_develop/create_pull_request.js @@ -6,7 +6,7 @@ module.exports = async ({ github, context }) => { repo: context.repo.repo } const pullsCreateParams = { - head: process.env.ORG_NAME + ':master', + head: context.repo.owner + ':master', base: 'develop', title: 'master -> develop', body: '鳩の歴史は同期される\ndevelopに新たなコミットがpushされる前にマージしてね!', diff --git a/scripts/pr_release_hato_bot/pr_release/create_pull_request.js b/scripts/pr_release_hato_bot/pr_release/create_pull_request.js index ce592e9ae5..ca690e9a49 100644 --- a/scripts/pr_release_hato_bot/pr_release/create_pull_request.js +++ b/scripts/pr_release_hato_bot/pr_release/create_pull_request.js @@ -6,7 +6,7 @@ module.exports = async ({ github, context }) => { repo: context.repo.repo } const pullsCreateParams = { - head: process.env.ORG_NAME + ':develop', + head: context.repo.owner + ':develop', base: 'master', title: 'リリース', body: '鳩は唐揚げになるため、片栗粉へ飛び込む',