Skip to content

Commit b9ee504

Browse files
authored
Merge pull request #1352 from Azure/jcotillo/update_basepath_reference
Pass pr prefix in gh action
2 parents 79db396 + dbf76f2 commit b9ee504

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: CI
33
on:
44
pull_request:
55
branches: [ master ]
6-
76
jobs:
87
build:
98
runs-on: ubuntu-latest
@@ -32,7 +31,9 @@ jobs:
3231
automerge:
3332
runs-on: ubuntu-latest
3433
needs: build
35-
if: ${{ contains(github.actor, 'openapi-sdkautomation') && startsWith(github.head_ref, 'sdkAuto/') }}
34+
env:
35+
PR_PREFIX: sdkAuto/
36+
if: ${{ github.actor == 'openapi-sdkautomation' }}
3637
steps:
3738
- uses: actions/checkout@v2
3839

@@ -48,7 +49,7 @@ jobs:
4849
- name: Check RP in Autogenlist
4950
run: |
5051
check_result='';
51-
exec=$(npm run find-basepath ${{ github.head_ref }});
52+
exec=$(npm run find-basepath ${{ github.head_ref }} $PR_PREFIX);
5253
while read line;
5354
do
5455
# overriding check_result until the last line is read, last line contains

generator/cmd/findbasepath.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ executeSynchronous(async () => {
99
}
1010

1111
const prName = process.argv[2];
12-
let basePath = prName.replace("sdkAutomation/", "");
12+
const prPrefix = process.argv[3];
13+
let basePath = prName.replace(prPrefix, "");
1314

1415
// format basePath
1516
basePath = `${basePath}/resource-manager`;

0 commit comments

Comments
 (0)