| 1 |
#!/bin/bash -e |
| 2 |
# |
| 3 |
# Copyright The OpenTelemetry Authors |
| 4 |
# SPDX-License-Identifier: Apache-2.0 |
| 5 |
|
| 6 |
# Check for [chore] Prepare release PRs in core repo |
| 7 |
BLOCKERS=$( gh pr list -A "otelbot[bot]" -S "[chore] Prepare release" --json url -q '.[].url' -R "${REPO}" ) |
| 8 |
|
| 9 |
# Check for [chore] Update core dependencies PRs in opentelemetry-collector-contrib |
| 10 |
CONTRIB_REPO="open-telemetry/opentelemetry-collector-contrib" |
| 11 |
CONTRIB_BLOCKERS=$( gh pr list -A "otelbot[bot]" -S "[chore] Update core dependencies" --json url -q '.[].url' -R "${CONTRIB_REPO}" ) |
| 12 |
|
| 13 |
# Combine both blockers |
| 14 |
BLOCKERS="${BLOCKERS}${BLOCKERS:+ }${CONTRIB_BLOCKERS}" |
| 15 |
|
| 16 |
if [ "${BLOCKERS}" != "" ]; then |
| 17 |
echo "Merging in main is frozen, as there are open release/update PRs: ${BLOCKERS}" |
| 18 |
echo "If you believe this is no longer true, re-run this job to unblock your PR." |
| 19 |
exit 1 |
| 20 |
fi |