Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
wknapik committed Oct 23, 2024
1 parent a271189 commit 583a5af
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/rerun-compare-chromium-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,20 @@ jobs:
echo "::notice::PR branch: ${pr_ver:?}, target branch: ${target_ver:?}"
if [[ "${pr_ver%%.*}" != "${target_ver%%.*}" ]]; then
echo "::notice::Rerunning compare-chromium-versions in PRs targeting ${GITHUB_BASE_REF:?}"
while read -r pr_number head_sha; do
run_id="$(gh api "/repos/$GITHUB_REPOSITORY/actions/workflows/compare-chromium-versions.yml/runs?head_sha=${head_sha:?}" -q '.workflow_runs[0].id')"
pr_url="https://github.com/brave/brave-core/pull/${pr_number:?}"
if [[ "$run_id" ]]; then
echo "::notice::Rerunning $run_id for $pr_url"
echo "Rerunning $run_id for $pr_url"
# FIXME: remove echo
echo gh -R "$GITHUB_REPOSITORY" run rerun "$run_id"
else
echo "No run found for $pr_url"
fi
sleep 1
done < <(gh -R "$GITHUB_REPOSITORY" pr list --limit 1000 --state open --base "${GITHUB_BASE_REF:?}" --json number,headRefOid -q '.[]|"\(.number)\t\(.headRefOid)"')
# FIXME: done < <(gh -R "$GITHUB_REPOSITORY" pr list --limit 1000 --state open --base "$GITHUB_BASE_REF" --json number,headRefOid -q '.[]|"\(.number)\t\(.headRefOid)"')
done < <(gh -R "$GITHUB_REPOSITORY" pr list --limit 10 --state open --base "$GITHUB_BASE_REF" --json number,headRefOid -q '.[]|"\(.number)\t\(.headRefOid)"')
else
echo "::notice::Chromium major versions match, nothing to do"
fi

0 comments on commit 583a5af

Please sign in to comment.