diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py --- a/llvm/utils/git/github-automation.py +++ b/llvm/utils/git/github-automation.py @@ -150,6 +150,10 @@ def issue_notify_pull_request(self, pull:github.PullRequest.PullRequest) -> None: self.issue.create_comment('/pull-request {}#{}'.format(self.branch_repo_name, pull.number)) + def issue_notify_no_milestone(self, comment) -> None: + message = "\n>{}\n\nError: Command failed due to missing milestone.".format(comment) + self.issue.create_comment(message) + @property def action_url(self) -> str: if os.getenv('CI'): @@ -443,6 +447,9 @@ release_workflow = ReleaseWorkflow(args.token, args.repo, args.issue_number, args.branch_repo, args.branch_repo_token, args.llvm_project_dir) + if not release_workflow.release_branch_for_issue: + release_workflow.issue_notify_no_milestone(''.join(sys.stdin.readlines())) + sys.exit(1) if args.sub_command == 'print-release-branch': release_workflow.print_release_branch() else: