Skip to content

Commit 6745b1c

Browse files
committed
スクリプト内でorg名を取得する
1 parent 8708db5 commit 6745b1c

File tree

5 files changed

+3
-11
lines changed

5 files changed

+3
-11
lines changed

.github/workflows/pr-merge-develop-hato-bot.yml

-4
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ jobs:
1616
- name: Get PullRequests
1717
uses: actions/github-script@v7.0.1
1818
id: get_pull_requests
19-
env:
20-
ORG_NAME: ${{ github.repository_owner }}
2119
with:
2220
github-token: ${{secrets.GITHUB_TOKEN}}
2321
script: |
@@ -26,8 +24,6 @@ jobs:
2624
- name: Create PullRequest
2725
uses: actions/github-script@v7.0.1
2826
if: ${{ steps.get_pull_requests.outputs.result == 0 }}
29-
env:
30-
ORG_NAME: ${{ github.repository_owner }}
3127
with:
3228
github-token: ${{secrets.GITHUB_TOKEN}}
3329
script: |

.github/workflows/pr-release-hato-bot.yml

-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ jobs:
1919
uses: actions/github-script@v7.0.1
2020
if: ${{ steps.get_diff.outputs.result != '' }}
2121
id: get_pull_requests
22-
env:
23-
ORG_NAME: ${{ github.repository_owner }}
2422
with:
2523
github-token: ${{secrets.GITHUB_TOKEN}}
2624
script: |
@@ -29,8 +27,6 @@ jobs:
2927
- name: Create PullRequest
3028
uses: actions/github-script@v7.0.1
3129
if: ${{ steps.get_diff.outputs.result != '' && steps.get_pull_requests.outputs.result == 0 }}
32-
env:
33-
ORG_NAME: ${{ github.repository_owner }}
3430
with:
3531
github-token: ${{secrets.GITHUB_TOKEN}}
3632
script: |

scripts/get_pull_requests_hato_bot.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = async ({ github, context }) => {
22
const pullsListParams = {
33
owner: context.repo.owner,
44
repo: context.repo.repo,
5-
head: process.env.ORG_NAME + ':develop',
5+
head: context.repo.owner + ':develop',
66
base: 'master',
77
state: 'open'
88
}

scripts/pr_merge_develop_hato_bot/pr_master_to_develop/create_pull_request.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = async ({ github, context }) => {
66
repo: context.repo.repo
77
}
88
const pullsCreateParams = {
9-
head: process.env.ORG_NAME + ':master',
9+
head: context.repo.owner + ':master',
1010
base: 'develop',
1111
title: 'master -> develop',
1212
body: '鳩の歴史は同期される\ndevelopに新たなコミットがpushされる前にマージしてね!',

scripts/pr_release_hato_bot/pr_release/create_pull_request.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = async ({ github, context }) => {
66
repo: context.repo.repo
77
}
88
const pullsCreateParams = {
9-
head: process.env.ORG_NAME + ':develop',
9+
head: context.repo.owner + ':develop',
1010
base: 'master',
1111
title: 'リリース',
1212
body: '鳩は唐揚げになるため、片栗粉へ飛び込む',

0 commit comments

Comments
 (0)