From ad7f0af28d35baaa2759bfc8e1d2e74e601bece6 Mon Sep 17 00:00:00 2001 From: Nicolas Harraudeau <40498978+nicolas-harraudeau-sonarsource@users.noreply.github.com> Date: Thu, 18 Feb 2021 17:47:40 +0100 Subject: [PATCH] Assign new pull request rules when created --- rspec-tools/rspec_tools/create_rule.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rspec-tools/rspec_tools/create_rule.py b/rspec-tools/rspec_tools/create_rule.py index 90660decc2..4079827be0 100644 --- a/rspec-tools/rspec_tools/create_rule.py +++ b/rspec-tools/rspec_tools/create_rule.py @@ -106,6 +106,11 @@ class RuleCreator: draft=True, maintainer_can_modify=True ) click.echo(f'Created rule Pull Request {pull_request.html_url}') + + github_user = github.get_user() + pull_request.add_to_assignees(github_user.login) + click.echo(f'Pull request assigned to {github_user.login}') + return pull_request @contextmanager