File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ jobs:
268268 tar xf gcc-arm
269269 - name : Build
270270 env :
271- GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
271+ PR_BODY : " ${{ github.event.pull_request.body }}"
272272 run : |
273273 export PATH=/tmp/${{ matrix.gcc_extract_dir }}/bin:$PATH
274274 script/check-arm-build
Original file line number Diff line number Diff line change 6767 submodules : true
6868 - name : Build OTBR Docker
6969 env :
70- GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
70+ PR_BODY : " ${{ github.event.pull_request.body }}"
7171 run : |
7272 ./script/test build_otbr_docker
7373 - name : Bootstrap
@@ -183,7 +183,7 @@ jobs:
183183 echo "FIREWALL=0" >> $GITHUB_ENV
184184 - name : Build OTBR Docker
185185 env :
186- GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
186+ PR_BODY : " ${{ github.event.pull_request.body }}"
187187 TREL : ${{ matrix.otbr_trel }}
188188 run : |
189189 ./script/test build_otbr_docker
Original file line number Diff line number Diff line change 4646 VIRTUAL_TIME : 1
4747 VIRTUAL_TIME_UART : 1
4848 MAX_NETWORK_SIZE : 999
49- GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
49+ PR_BODY : " ${{ github.event.pull_request.body }}"
5050
5151permissions : # added using https://github.com/step-security/secure-workflows
5252 contents : read
Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ jobs:
282282 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
283283 - name : Bootstrap
284284 env :
285- GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
285+ PR_BODY : " ${{ github.event.pull_request.body }}"
286286 run : |
287287 sudo apt-get --no-install-recommends install -y expect ninja-build lcov
288288 sudo bash script/install_socat
Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ jobs:
318318 cache : pip
319319 - name : Bootstrap
320320 env :
321- GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
321+ PR_BODY : " ${{ github.event.pull_request.body }}"
322322 run : |
323323 sudo apt-get update
324324 sudo apt-get install -y avahi-daemon avahi-utils lcov
Original file line number Diff line number Diff line change 6060 git checkout FETCH_HEAD
6161 - name : Run
6262 env :
63+ OT_BASE_BRANCH : " ${{ github.base_ref }}"
6364 PR_BODY : " ${{ github.event.pull_request.body }}"
64- PR_NUMBER : " ${{ github.event.pull_request.number }}"
6565 run : |
6666 ./script/check-size
6767 cat /tmp/ot-size-report/report_pr >> $GITHUB_STEP_SUMMARY
Original file line number Diff line number Diff line change 7272 cache : pip
7373 - name : Bootstrap
7474 env :
75- GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
75+ PR_BODY : " ${{ github.event.pull_request.body }}"
7676 run : |
7777 sudo apt-get update
7878 sudo apt-get --no-install-recommends install -y ninja-build lcov
@@ -107,7 +107,7 @@ jobs:
107107 cache : pip
108108 - name : Bootstrap
109109 env :
110- GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
110+ PR_BODY : " ${{ github.event.pull_request.body }}"
111111 run : |
112112 sudo apt-get update
113113 sudo apt-get --no-install-recommends install -y ninja-build lcov
@@ -144,7 +144,7 @@ jobs:
144144 cache : pip
145145 - name : Bootstrap
146146 env :
147- GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
147+ PR_BODY : " ${{ github.event.pull_request.body }}"
148148 run : |
149149 sudo apt-get update
150150 sudo apt-get --no-install-recommends install -y ninja-build
@@ -182,7 +182,7 @@ jobs:
182182 submodules : true
183183 - name : Bootstrap
184184 env :
185- GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
185+ PR_BODY : " ${{ github.event.pull_request.body }}"
186186 run : |
187187 brew update
188188 brew install ninja
@@ -204,7 +204,7 @@ jobs:
204204 submodules : true
205205 - name : Bootstrap
206206 env :
207- GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
207+ PR_BODY : " ${{ github.event.pull_request.body }}"
208208 run : |
209209 sudo apt-get update
210210 sudo apt-get --no-install-recommends install -y ninja-build lcov
Original file line number Diff line number Diff line change @@ -47,41 +47,14 @@ apply_dependencies()
4747 depends_on_pr=" $( echo " ${dependency} " | tr -d ' \r\n' | cut -d# -f2) "
4848 echo " pr: #${depends_on_pr} "
4949 git pull --no-edit --no-rebase origin " pull/${depends_on_pr} /merge"
50- done < <( grep -E " ^Depends-On: *${project_name} " || true)
51- }
52-
53- get_pr_body ()
54- {
55- local pr
56-
57- if [[ -z ${PR_BODY+x} ]]; then
58- echo ' PR_BODY is not set' >&2
59- else
60- echo ' PR_BODY is set' >&2
61- echo " ${PR_BODY} "
62- return 0
63- fi
64-
65- [[ ${GITHUB_ACTIONS+x} && ${GITHUB_REF-} =~ ^refs/pull/[0-9]+/merge ]] || {
66- echo ' Not a pull request.' >&2
67- return 0
68- }
69-
70- pr=" $( echo " ${GITHUB_REF} " | cut -d/ -f3) "
71-
72- # do not print GITHUB_TOKEN
73- set +x
74- curl -H " authorization: Bearer ${GITHUB_TOKEN} " -H ' content-type: application/json' \
75- " https://api.github.com/repos/${GITHUB_REPOSITORY} /pulls/${pr} " \
76- | jq -r .body
77- set -x
50+ done < <( grep -E " ^Depends-On: *${project_name} " <<< " ${PR_BODY:-}" || true)
7851}
7952
8053try_update ()
8154{
8255 cd " $1 "
8356
84- get_pr_body | apply_dependencies
57+ apply_dependencies
8558}
8659
8760try_clone ()
@@ -95,7 +68,7 @@ try_clone()
9568 dest_dir=" $( git clone " $@ " 2>&1 | tee | cut -d\' -f2) "
9669
9770 cd " ${dest_dir} "
98- get_pr_body | apply_dependencies
71+ apply_dependencies
9972 fi
10073}
10174
You can’t perform that action at this time.
0 commit comments