From d4ffdef7d1b2c556f46efaef8bfc848fbf100e2e Mon Sep 17 00:00:00 2001 From: Carlos Date: Thu, 25 Dec 2025 11:51:35 +0100 Subject: [PATCH] fix: Update GitHub status message to match state from comment_pr() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a PR's tests complete, the code sets the initial state and message based on crashes/results. Then for PRs, comment_pr() returns a potentially different state (SUCCESS if no NEW failures vs master). However, the message was never updated to match this new state. This caused confusing situations where all tests passed (state=SUCCESS) but the message said "Not all tests completed successfully". Now the message is updated after comment_pr() to match the returned state: - SUCCESS: "All tests passed" - FAILURE: "Not all tests completed successfully, please check" Fixes issue where test 7203 showed all tests passed on the sample platform but GitHub showed "Not all tests completed successfully". 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- mod_ci/controllers.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mod_ci/controllers.py b/mod_ci/controllers.py index 73f1f9d6..cc0584e2 100755 --- a/mod_ci/controllers.py +++ b/mod_ci/controllers.py @@ -1890,6 +1890,13 @@ def progress_type_request(log, test, test_id, request) -> bool: message = 'Tests completed' if test.test_type == TestType.pull_request: state = comment_pr(test) + # Update message to match the state returned by comment_pr() + # comment_pr() uses different logic: it returns SUCCESS if there are + # no NEW failures compared to master (pre-existing failures are OK) + if state == Status.SUCCESS: + message = 'All tests passed' + else: + message = 'Not all tests completed successfully, please check' update_build_badge(state, test) else: