File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,15 @@ run-name: 'Pull request approve workflow ${{ github.event.pull_request.head.ref
44on :
55 pull_request_review :
66 types : [ submitted ]
7+ workflow_call :
8+ target_branch :
9+ description : ' Target branch of the PR (github.event.pull_request.base.ref)'
10+ required : true
11+ type : string
12+ head_ref :
13+ description : ' Source branch of the PR (github.event.pull_request.head.ref)'
14+ required : true
15+ type : string
716
817jobs :
918 calculate-xetabase-branch :
@@ -23,10 +32,10 @@ jobs:
2332 name : " Get current branch for Xetabase from target branch"
2433 run : |
2534 chmod +x ./.github/workflows/scripts/get-xetabase-branch.sh
26- echo "github.event.pull_request.base.ref: ${{ github.event.pull_request.base.ref }}"
27- echo "github.event.pull_request.head.ref: ${{ github.event.pull_request.head.ref }}"
35+ echo "github.event.pull_request.base.ref: ${{ github.event.pull_request.base.ref || inputs.target_branch }}"
36+ echo "github.event.pull_request.head.ref: ${{ github.event.pull_request.head.ref || inputs.head_ref }}"
2837 echo "secrets.ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}"
29- xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.base.ref }} ${{ github.event.pull_request.head.ref }})
38+ xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.base.ref || inputs.target_branch }} ${{ github.event.pull_request.head.ref || inputs.head_ref }})
3039 echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY}
3140 echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT
3241 env :
3847 uses : ./.github/workflows/test-xetabase-workflow.yml
3948 with :
4049 branch : ${{ needs.calculate-xetabase-branch.outputs.xetabase_branch }}
41- task : ${{ github.event.pull_request.head.ref }}
50+ task : ${{ github.event.pull_request.head.ref || inputs.head_ref }}
4251 secrets : inherit
Original file line number Diff line number Diff line change @@ -15,15 +15,15 @@ jobs:
1515 secrets : inherit
1616
1717 test-xetabase :
18- name : " Run all tests before merging"
19- uses : ./.github/workflows/test-xetabase-workflow .yml
18+ name : " Run all tests before merging java-common-libs TASK-8067 into develop "
19+ uses : ./.github/workflows/pull-request-approve .yml
2020 with :
21- branch : TASK-8067
22- task : TASK-8067
21+ target_branch : develop
22+ head_ref : TASK-8067
2323 secrets : inherit
2424
25-
2625 test-pull-request-approve :
26+ name : " TEST CI_CORE TASK-8067 into develop"
2727 uses : opencb/ci-core/.github/workflows/pull-request-approve.yml@main
2828 with :
2929 target_branch : develop
You can’t perform that action at this time.
0 commit comments