File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Merge freeze
2
+
3
+ on :
4
+ pull_request :
5
+ types :
6
+ - opened
7
+ - ready_for_review
8
+ - synchronize
9
+ - reopened
10
+ - labeled
11
+ - unlabeled
12
+ - enqueued
13
+ branches : [main]
14
+ merge_group :
15
+ types : [checks_requested]
16
+
17
+ permissions : read-all
18
+
19
+ jobs :
20
+ check-merge-freeze :
21
+ name : Check
22
+ # This condition is to avoid blocking the PR causing the freeze in the first place.
23
+ if : |
24
+ (!startsWith(github.event.pull_request.title || github.event.merge_group.head_commit.message, '[chore] Prepare release')) ||
25
+ (!(github.event.pull_request.user.login == 'opentelemetrybot' || github.event.merge_group.head_commit.author.name == 'OpenTelemetry Bot'))
26
+ runs-on : ubuntu-latest
27
+ steps :
28
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29
+ with :
30
+ sparse-checkout : .github/workflows/scripts
31
+ - run : ./.github/workflows/scripts/check-merge-freeze.sh
32
+ env :
33
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
+ REPO : open-telemetry/opentelemetry-collector-contrib
Original file line number Diff line number Diff line change
1
+ #! /bin/bash -e
2
+ #
3
+ # Copyright The OpenTelemetry Authors
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ BLOCKERS=$( gh pr list -A opentelemetrybot -S " [chore] Prepare release" --json url -q ' .[].url' -R " ${REPO} " )
7
+ if [ " ${BLOCKERS} " != " " ]; then
8
+ echo " Merging in main is frozen, as there are open \" Prepare release\" PRs: ${BLOCKERS} "
9
+ echo " If you believe this is no longer true, re-run this job to unblock your PR."
10
+ exit 1
11
+ fi
You can’t perform that action at this time.
0 commit comments