[git] pull dependency pull requests (#6234)

This commit is contained in:
Yakun Xu
2021-03-04 08:26:26 -08:00
committed by GitHub
parent f293d625da
commit a3e87b14fe
3 changed files with 8 additions and 10 deletions
+1 -2
View File
@@ -44,8 +44,6 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Bootstrap
if: "github.event_name == 'push'"
run: |
@@ -55,6 +53,7 @@ jobs:
env:
OT_BASE_BRANCH: "${{ github.base_ref }}"
SIZE_REPORT_URL: "https://openthread-size-report.glitch.me/size-report/1354027"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
export PATH=$PATH:$HOME/.local/bin
./script/check-size
+1 -1
View File
@@ -157,7 +157,7 @@ size_nrf52840_version()
# new commit
mkdir -p "${OT_TMP_DIR}/b"
git clone https://github.com/openthread/ot-nrf528xx.git "${OT_TMP_DIR}/b"
script/git-tool clone https://github.com/openthread/ot-nrf528xx.git "${OT_TMP_DIR}/b"
rm -rf "${OT_TMP_DIR}/b/openthread/*" # replace openthread submodule with latest commit
git archive "${OT_SHA_NEW}" | tar x -C "${OT_TMP_DIR}/b/openthread"
+6 -7
View File
@@ -38,13 +38,12 @@ apply_dependencies()
project_name=$(git remote get-url origin | grep -oE '[^/:]+/[^/:]+\.git$' | cut -d. -f1)
echo "project name: ${project_name}"
depends_on_pr="$(grep -E "^Depends-On: *${project_name}" | cut -d# -f2)" || {
echo "No dependency on ${project_name} found."
return 0
}
echo "pr: #${depends_on_pr}"
git fetch --depth 1 origin "pull/${depends_on_pr}/head"
git checkout FETCH_HEAD
while read -r dependency; do
echo "${dependency}"
depends_on_pr="$(echo "${dependency}" | tr -d '\r\n' | cut -d# -f2)"
echo "pr: #${depends_on_pr}"
git pull origin "pull/${depends_on_pr}/merge"
done < <(grep -E "^Depends-On: *${project_name}" || true)
}
get_pr_body()