From 7b804b5ce7331a0af33e40147fe2dc9dd6465007 Mon Sep 17 00:00:00 2001 From: Dmitrii Anoshin Date: Tue, 7 Jan 2025 13:26:07 -0800 Subject: [PATCH] [chore] Fix check merge freeze job (#12045) To unblock https://github.com/open-telemetry/opentelemetry-collector/pull/12043, which is always rejected on the queue. Apparently, `github.event.merge_group.head_commit.author.name` is `OpenTelemetry Bot` not `opentelemetrybot`. See https://github.com/open-telemetry/opentelemetry-collector/actions/runs/12658978490/job/35277057933. Since `github.event.merge_group.head_commit.author` doesn't have `login` field, I've switched the condition to use the `name` field on both `github.event.pull_request.user` and `github.event.merge_group.head_commit.author` --- .github/workflows/check-merge-freeze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-merge-freeze.yml b/.github/workflows/check-merge-freeze.yml index a1eaf21130e..87f4ea8fda6 100644 --- a/.github/workflows/check-merge-freeze.yml +++ b/.github/workflows/check-merge-freeze.yml @@ -24,7 +24,7 @@ jobs: # This condition is to avoid blocking the PR causing the freeze in the first place. if: | (!startsWith(github.event.pull_request.title || github.event.merge_group.head_commit.message, '[chore] Prepare release')) || - (github.event.pull_request.user.login || github.event.merge_group.head_commit.author.name) != 'opentelemetrybot' + (github.event.pull_request.user.name || github.event.merge_group.head_commit.author.name) != 'OpenTelemetry Bot' runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2