diff --git a/src/oca_github_bot/tasks/migration_issue_bot.py b/src/oca_github_bot/tasks/migration_issue_bot.py index 86118b5a..0837fc33 100644 --- a/src/oca_github_bot/tasks/migration_issue_bot.py +++ b/src/oca_github_bot/tasks/migration_issue_bot.py @@ -113,7 +113,9 @@ def migration_issue_start(org, repo, pr, username, module=None, dry_run=False): ) return # Change issue to add the PR in the module list - new_body = _set_lines_issue(gh_pr.user.login, gh_pr.number, issue.body, module) + new_body = _set_lines_issue( + gh_pr.user.login, gh_pr.number, issue.body, module + ) issue.edit(body=new_body) except Exception as e: github.gh_call( diff --git a/tests/test_migration_issue_bot.py b/tests/test_migration_issue_bot.py index 847fdfab..94ee09fa 100644 --- a/tests/test_migration_issue_bot.py +++ b/tests/test_migration_issue_bot.py @@ -39,27 +39,24 @@ def test_set_lines_issue(gh): ( "Issue with list but not the module\n" "- [ ] a_module_1 - By @legalsylvain - #1\n" - "- [ ] z_module_1 - By @pedrobaeza - #2" - , + "- [ ] z_module_1 - By @pedrobaeza - #2", f"Issue with list but not the module\n" f"- [ ] a_module_1 - By @legalsylvain - #1\n" f"- [ ] {module} - By @{gh_pr_user_login} - #{gh_pr_number}\n" - f"- [ ] z_module_1 - By @pedrobaeza - #2" + f"- [ ] z_module_1 - By @pedrobaeza - #2", ), ( f"Issue with list containing the module\n" f"- [x] {module} - By @legalsylvain - #1\n" - f"- [ ] z_module_1 - By @pedrobaeza - #2" - , + f"- [ ] z_module_1 - By @pedrobaeza - #2", f"Issue with list containing the module\n" f"- [x] {module} - By @{gh_pr_user_login} - #{gh_pr_number}\n" - f"- [ ] z_module_1 - By @pedrobaeza - #2" + f"- [ ] z_module_1 - By @pedrobaeza - #2", ), ( - "Issue with no list" - , + "Issue with no list", f"Issue with no list\n" - f"- [ ] {module} - By @{gh_pr_user_login} - #{gh_pr_number}" + f"- [ ] {module} - By @{gh_pr_user_login} - #{gh_pr_number}", ), ] for (old_body, new_body_expected) in body_transformation: