Skip to content

Implement a merge freeze when an "[chore] Update core dependencies" PR on opentelemetry-collector-contrib is present #12837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/scripts/check-merge-freeze.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,18 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

# Check for [chore] Prepare release PRs in core repo
BLOCKERS=$( gh pr list -A opentelemetrybot -S "[chore] Prepare release" --json url -q '.[].url' -R "${REPO}" )

# Check for [chore] Update core dependencies PRs in opentelemetry-collector-contrib
CONTRIB_REPO="open-telemetry/opentelemetry-collector-contrib"
CONTRIB_BLOCKERS=$( gh pr list -A opentelemetrybot -S "[chore] Update core dependencies" --json url -q '.[].url' -R "${CONTRIB_REPO}" )

# Combine both blockers
BLOCKERS="${BLOCKERS}${BLOCKERS:+ }${CONTRIB_BLOCKERS}"

if [ "${BLOCKERS}" != "" ]; then
echo "Merging in main is frozen, as there are open \"Prepare release\" PRs: ${BLOCKERS}"
echo "Merging in main is frozen, as there are open release/update PRs: ${BLOCKERS}"
echo "If you believe this is no longer true, re-run this job to unblock your PR."
exit 1
fi