Skip to content

Commit 2725515

Browse files
committed
use tc messages
1 parent 452e771 commit 2725515

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

scripts/pr_check/pr_check.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import click
12
from github import Github
23
from github.PullRequest import PullRequest
34
from 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']")

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.3
1+
1.0.4

0 commit comments

Comments
 (0)