Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Conversation

@joseph-sentry
Copy link
Contributor

if we get a branch with gh-readonly-queue, it comes from a merge queue and the actual branch name is located in the middle

@joseph-sentry joseph-sentry requested a review from a team May 1, 2025 17:48
@codecov
Copy link

codecov bot commented May 1, 2025

❌ 5 Tests Failed:

Tests completed Failed Passed Skipped
3440 5 3435 5
View the top 3 failed test(s) by shortest run time
api.temp.calculator.test_calculator::test_divide
Stack Traces | 0.001s run time
def
                test_divide():
                > assert Calculator.divide(1, 2) == 0.5
                E assert 1.0 == 0.5
                E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
                E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
                .../temp/calculator/test_calculator.py:30: AssertionError
api.temp.calculator.test_calculator::test_divide
Stack Traces | 0.001s run time
def
                test_divide():
                > assert Calculator.divide(1, 2) == 0.5
                E assert 1.0 == 0.5
                E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
                E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
                .../temp/calculator/test_calculator.py:30: AssertionError
api.temp.calculator.test_calculator::test_divide
Stack Traces | 0.001s run time
def
                test_divide():
                > assert Calculator.divide(1, 2) == 0.5
                E assert 1.0 == 0.5
                E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
                E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
                .../temp/calculator/test_calculator.py:30: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@github-actions
Copy link

github-actions bot commented May 1, 2025

✅ All tests successful. No failed tests were found.

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

Copy link
Contributor

@thomasrockhu-codecov thomasrockhu-codecov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic is sound

Comment on lines 83 to 84
if branch and branch.startswith("gh-readonly-queue/"):
return branch.split("/")[1]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for clarity can we do

Suggested change
if branch and branch.startswith("gh-readonly-queue/"):
return branch.split("/")[1]
if branch:
branch = branch.split("/")[1] if branch.startswith("gh-readonly-queue/") else branch
return branch

if we get a branch with gh-readonly-queue, it comes from a merge queue
and the actual branch name is located in the middle
return branch.split("/")[1]

branch = match.group(1)
return branch or None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my worry here is if we depend on None to be meaningful versus ''. Previous logic doesn't account for empty string

Copy link
Contributor

@thomasrockhu-codecov thomasrockhu-codecov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joseph-sentry this looks good, can we move it to prevent-cli though?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants