diff --git a/.github/actions/linkbot/linkbot/__main__.py b/.github/actions/linkbot/linkbot/__main__.py index e283a6f2b..d1edde276 100644 --- a/.github/actions/linkbot/linkbot/__main__.py +++ b/.github/actions/linkbot/linkbot/__main__.py @@ -13,7 +13,7 @@ gh = github.Client(conf.gh_token) repo_root = pathlib.Path(conf.repo_root) all_links = github_links_in_files(repo_root, conf.glob) -bot_messages = gh.get_open_issue_messages(conf.repo_url, conf.gh_user) +bot_messages = gh.get_all_issue_messages(conf.repo_url, conf.gh_user) existing_links = github_links_in_strs(bot_messages) for link in all_links: try: diff --git a/.github/actions/linkbot/linkbot/github.py b/.github/actions/linkbot/linkbot/github.py index 4493adbea..e4329269f 100644 --- a/.github/actions/linkbot/linkbot/github.py +++ b/.github/actions/linkbot/linkbot/github.py @@ -43,10 +43,10 @@ def get_repo_stats(self, url): ) - def get_open_issue_messages(self, repo_url, user): + def get_all_issue_messages(self, repo_url, user): full_name = repo_full_name_from_url(repo_url) repo = self._pygh.get_repo(full_name) - return [issue.body for issue in repo.get_issues(state='open', creator=user)] + return [issue.body for issue in repo.get_issues(state='all', creator=user)] def create_issue(self, repo_url, title, body): diff --git a/.github/actions/linkbot/tests/test_github.py b/.github/actions/linkbot/tests/test_github.py index 94f517990..8243ad236 100644 --- a/.github/actions/linkbot/tests/test_github.py +++ b/.github/actions/linkbot/tests/test_github.py @@ -23,9 +23,7 @@ def test_get_repo_stats(): @pytest.mark.network -def test_get_open_issue_messages(): +def test_get_all_issue_messages(): gh = Client(os.environ.get('LINKBOT_GH_TOKEN')) - expected = 'java.lang.IllegalArgumentException' - messages = gh.get_open_issue_messages('https://github.com/bellkev/dacom', 'r00k') - assert len(messages) == 1 - assert expected in messages[0] \ No newline at end of file + messages = gh.get_all_issue_messages('https://github.com/bellkev/dacom', 'r00k') + assert len(messages) == 2 \ No newline at end of file