Skip to content

Commit 34dfedb

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c7a966d commit 34dfedb

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

src/oca_github_bot/tasks/migration_issue_bot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ def migration_issue_start(org, repo, pr, username, module=None, dry_run=False):
113113
)
114114
return
115115
# Change issue to add the PR in the module list
116-
new_body = _set_lines_issue(gh_pr.user.login, gh_pr.number, issue.body, module)
116+
new_body = _set_lines_issue(
117+
gh_pr.user.login, gh_pr.number, issue.body, module
118+
)
117119
issue.edit(body=new_body)
118120
except Exception as e:
119121
github.gh_call(

tests/test_migration_issue_bot.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,24 @@ def test_set_lines_issue(gh):
3939
(
4040
"Issue with list but not the module\n"
4141
"- [ ] a_module_1 - By @legalsylvain - #1\n"
42-
"- [ ] z_module_1 - By @pedrobaeza - #2"
43-
,
42+
"- [ ] z_module_1 - By @pedrobaeza - #2",
4443
f"Issue with list but not the module\n"
4544
f"- [ ] a_module_1 - By @legalsylvain - #1\n"
4645
f"- [ ] {module} - By @{gh_pr_user_login} - #{gh_pr_number}\n"
47-
f"- [ ] z_module_1 - By @pedrobaeza - #2"
46+
f"- [ ] z_module_1 - By @pedrobaeza - #2",
4847
),
4948
(
5049
f"Issue with list containing the module\n"
5150
f"- [x] {module} - By @legalsylvain - #1\n"
52-
f"- [ ] z_module_1 - By @pedrobaeza - #2"
53-
,
51+
f"- [ ] z_module_1 - By @pedrobaeza - #2",
5452
f"Issue with list containing the module\n"
5553
f"- [x] {module} - By @{gh_pr_user_login} - #{gh_pr_number}\n"
56-
f"- [ ] z_module_1 - By @pedrobaeza - #2"
54+
f"- [ ] z_module_1 - By @pedrobaeza - #2",
5755
),
5856
(
59-
"Issue with no list"
60-
,
57+
"Issue with no list",
6158
f"Issue with no list\n"
62-
f"- [ ] {module} - By @{gh_pr_user_login} - #{gh_pr_number}"
59+
f"- [ ] {module} - By @{gh_pr_user_login} - #{gh_pr_number}",
6360
),
6461
]
6562
for (old_body, new_body_expected) in body_transformation:

0 commit comments

Comments
 (0)