diff --git a/src/oca_github_bot/tasks/migration_issue_bot.py b/src/oca_github_bot/tasks/migration_issue_bot.py index c58725bf..0975d9c0 100644 --- a/src/oca_github_bot/tasks/migration_issue_bot.py +++ b/src/oca_github_bot/tasks/migration_issue_bot.py @@ -22,7 +22,7 @@ def _create_or_find_branch_milestone(gh_repo, branch): def _find_issue(gh_repo, milestone, target_branch): issue_title = f"Migration to version {target_branch}" issue = False - for i in gh_repo.issues(milestone=milestone.number): + for i in gh_repo.issues(milestone=milestone.number, state="all"): if i.title == issue_title: issue = i break diff --git a/tests/cassettes/test_find_issue.yaml b/tests/cassettes/test_find_issue.yaml index 24c0f282..db8193c0 100644 --- a/tests/cassettes/test_find_issue.yaml +++ b/tests/cassettes/test_find_issue.yaml @@ -615,7 +615,7 @@ interactions: authorization: - DUMMY method: GET - uri: https://api.github.com/repos/OCA/contract/issues?milestone=8&per_page=100 + uri: https://api.github.com/repos/OCA/contract/issues?milestone=8&per_page=100&state=all response: body: string: |-