@@ -1155,12 +1155,14 @@ def not_eligible(msg):
11551155
11561156 # check test suite result, Travis must give green light
11571157 msg_tmpl = "* test suite passes: %s"
1158+ failed_status_last_commit = False
11581159 if pr_data ['status_last_commit' ] == STATUS_SUCCESS :
11591160 print_msg (msg_tmpl % 'OK' , prefix = False )
11601161 elif pr_data ['status_last_commit' ] == STATUS_PENDING :
11611162 res = not_eligible (msg_tmpl % "pending..." )
11621163 else :
11631164 res = not_eligible (msg_tmpl % "(status: %s)" % pr_data ['status_last_commit' ])
1165+ failed_status_last_commit = True
11641166
11651167 if pr_data ['base' ]['repo' ]['name' ] == GITHUB_EASYCONFIGS_REPO :
11661168 # check for successful test report (checked in reverse order)
@@ -1221,14 +1223,20 @@ def not_eligible(msg):
12211223
12221224 # check github mergeable state
12231225 msg_tmpl = "* mergeable state is clean: %s"
1226+ mergeable = False
12241227 if pr_data ['merged' ]:
12251228 print_msg (msg_tmpl % "PR is already merged" , prefix = False )
12261229 elif pr_data ['mergeable_state' ] == GITHUB_MERGEABLE_STATE_CLEAN :
12271230 print_msg (msg_tmpl % "OK" , prefix = False )
1231+ mergeable = True
12281232 else :
12291233 reason = "FAILED (mergeable state is '%s')" % pr_data ['mergeable_state' ]
12301234 res = not_eligible (msg_tmpl % reason )
12311235
1236+ if failed_status_last_commit and mergeable :
1237+ print_msg ("\n This PR is mergeable but the test suite has a failed status. Try syncing the PR with the "
1238+ "develop branch using 'eb --sync-pr-with-develop %s'" % pr_data ['number' ], prefix = False )
1239+
12321240 return res
12331241
12341242
0 commit comments