File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1+ import click
12from github import Github
23from github .PullRequest import PullRequest
34from github .Repository import Repository
@@ -41,5 +42,8 @@ def verify_user_can_trigger_build(
4142 repo = github .get_repo (f"{ owner } /{ repo_name } " )
4243 pull = repo .get_pull (int (pr_number ))
4344
44- validate_pr_target_branch_in_valid_branches (pull , valid_branches )
45- validate_author_pr_is_member_of_org (repo , github , pull )
45+ try :
46+ validate_pr_target_branch_in_valid_branches (pull , valid_branches )
47+ validate_author_pr_is_member_of_org (repo , github , pull )
48+ except ValueError as e :
49+ click .echo (f"teamcity[buildStop comment='{ str (e )} ' readdToQueue='false']" )
Original file line number Diff line number Diff line change 1- 1.0.3
1+ 1.0.4
You can’t perform that action at this time.
0 commit comments