Skip to content

fix(ci-insights): Handle empty base ref in branch name derivation#393

Open
remyduthu wants to merge 2 commits intomainfrom
devs/remyduthu/remyduthu/mrgfy-6820-mode-selection-uses-base-branch-too-broadly/If051293b79e15e15c8ee6344eae54cfa00041a8e
Open

fix(ci-insights): Handle empty base ref in branch name derivation#393
remyduthu wants to merge 2 commits intomainfrom
devs/remyduthu/remyduthu/mrgfy-6820-mode-selection-uses-base-branch-too-broadly/If051293b79e15e15c8ee6344eae54cfa00041a8e

Conversation

@remyduthu
Copy link
Copy Markdown
Contributor

When GITHUB_BASE_REF="" is present (push/scheduled runs),
resource.attributes.get() returns the empty string instead of falling
through to HEAD. Use or to ensure the head ref is used when the base
ref is falsy, so quarantine keeps working on push/scheduled runs.

Relates-To: MRGFY-6820

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Depends-On: #392

remyduthu and others added 2 commits April 3, 2026 10:17
…election

The mode selection between 'new' and 'unhealthy' was using branch_name
presence, which derived from BASE with HEAD fallback. Since HEAD is
almost always available (via GITHUB_REF_NAME), scheduled/push runs
incorrectly selected 'new' mode.

Fixes: MRGFY-6820

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Change-Id: I25975a8cfe61b7d51aa28ec9a5ade3701dcc8aac
When `GITHUB_BASE_REF=""` is present (push/scheduled runs),
`resource.attributes.get()` returns the empty string instead of falling
through to HEAD. Use `or` to ensure the head ref is used when the base
ref is falsy, so quarantine keeps working on push/scheduled runs.

Relates-To: MRGFY-6820

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Change-Id: If051293b79e15e15c8ee6344eae54cfa00041a8e
@remyduthu
Copy link
Copy Markdown
Contributor Author

This pull request is part of a stack:

  1. fix(ci-insights): Use base branch presence as PR indicator for mode selection (#392)
  2. fix(ci-insights): Handle empty base ref in branch name derivation (#393) 👈

@mergify mergify bot had a problem deploying to Mergify Merge Protections April 3, 2026 09:24 Failure
@remyduthu remyduthu self-assigned this Apr 3, 2026
@remyduthu remyduthu marked this pull request as ready for review April 3, 2026 09:25
@mergify
Copy link
Copy Markdown

mergify bot commented Apr 3, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 Approval

This rule is failing.
  • #approved-reviews-by >= 2

🟢 ⛓️ Depends-On Requirements

Wonderful, this rule succeeded.

Requirement based on the presence of Depends-On in the body of the pull request

🟢 Continuous Integration

Wonderful, this rule succeeded.
  • all of:
    • check-success = codespell
    • check-success = test (3.10)
    • check-success = test (3.11)
    • check-success = test (3.12)
    • check-success = test (3.13)
    • check-success = test (3.14)
    • check-success = test (3.8)
    • check-success = test (3.9)

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?:

🟢 🔎 Reviews

Wonderful, this rule succeeded.
  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

@mergify mergify bot requested a review from a team April 3, 2026 09:26
Base automatically changed from devs/remyduthu/remyduthu/mrgfy-6820-mode-selection-uses-base-branch-too-broadly/I25975a8cfe61b7d51aa28ec9a5ade3701dcc8aac to main April 3, 2026 11:23
@mergify
Copy link
Copy Markdown

mergify bot commented Apr 3, 2026

@remyduthu this pull request is now in conflict 😩

@mergify mergify bot added the conflict label Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants