Skip to content

Commit 8708db5

Browse files
committed
CIでのorganization名取得を変数から行う
1 parent c8de1df commit 8708db5

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

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

+2-9
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,11 @@ jobs:
1313
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1414
with:
1515
fetch-depth: 0
16-
- name: Set org name
17-
uses: actions/github-script@v7.0.1
18-
id: set_org_name
19-
with:
20-
github-token: ${{secrets.GITHUB_TOKEN}}
21-
result-encoding: string
22-
script: return process.env.GITHUB_REPOSITORY.split('/')[0]
2316
- name: Get PullRequests
2417
uses: actions/github-script@v7.0.1
2518
id: get_pull_requests
2619
env:
27-
ORG_NAME: ${{steps.set_org_name.outputs.result}}
20+
ORG_NAME: ${{ github.repository_owner }}
2821
with:
2922
github-token: ${{secrets.GITHUB_TOKEN}}
3023
script: |
@@ -34,7 +27,7 @@ jobs:
3427
uses: actions/github-script@v7.0.1
3528
if: ${{ steps.get_pull_requests.outputs.result == 0 }}
3629
env:
37-
ORG_NAME: ${{steps.set_org_name.outputs.result}}
30+
ORG_NAME: ${{ github.repository_owner }}
3831
with:
3932
github-token: ${{secrets.GITHUB_TOKEN}}
4033
script: |

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

+2-9
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,12 @@ jobs:
1515
- name: Get diff
1616
id: get_diff
1717
run: bash "${GITHUB_WORKSPACE}/scripts/pr_release_hato_bot/pr_release/get_diff.sh"
18-
- name: Set org name
19-
uses: actions/github-script@v7.0.1
20-
id: set_org_name
21-
with:
22-
github-token: ${{secrets.GITHUB_TOKEN}}
23-
result-encoding: string
24-
script: return process.env.GITHUB_REPOSITORY.split('/')[0]
2518
- name: Get PullRequests
2619
uses: actions/github-script@v7.0.1
2720
if: ${{ steps.get_diff.outputs.result != '' }}
2821
id: get_pull_requests
2922
env:
30-
ORG_NAME: ${{steps.set_org_name.outputs.result}}
23+
ORG_NAME: ${{ github.repository_owner }}
3124
with:
3225
github-token: ${{secrets.GITHUB_TOKEN}}
3326
script: |
@@ -37,7 +30,7 @@ jobs:
3730
uses: actions/github-script@v7.0.1
3831
if: ${{ steps.get_diff.outputs.result != '' && steps.get_pull_requests.outputs.result == 0 }}
3932
env:
40-
ORG_NAME: ${{steps.set_org_name.outputs.result}}
33+
ORG_NAME: ${{ github.repository_owner }}
4134
with:
4235
github-token: ${{secrets.GITHUB_TOKEN}}
4336
script: |

0 commit comments

Comments
 (0)