Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error posting comments TypeError: PullRequest.get_pr_comments.<locals>.get_element() missing 1 required positional argument: 'completed' #144

Open
vgvassilev opened this issue Mar 8, 2025 · 0 comments

Comments

@vgvassilev
Copy link

vgvassilev commented Mar 8, 2025

Hello,

I get a strange error:

Removing already posted or extra comments
Traceback (most recent call last):
  File "/usr/local/bin/post", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/local/lib/python3.13/site-packages/clang_tidy_review/post.py", line 104, in main
    exit_code = post_review(
        pull_request, review, args.max_comments, lgtm_comment_body, args.dry_run
    )
  File "/usr/local/lib/python3.13/site-packages/clang_tidy_review/__init__.py", line 1341, in post_review
    trimmed_review = cull_comments(pull_request, decorated_review, max_comments)
  File "/usr/local/lib/python3.13/site-packages/clang_tidy_review/__init__.py", line 1243, in cull_comments
    posted_comments = {HashableComment(**c) for c in pull_request.get_pr_comments()}
                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/github/PaginatedList.py", line 84, in __iter__
    newElements = self._grow()
  File "/usr/local/lib/python3.13/site-packages/github/PaginatedList.py", line 95, in _grow
    newElements = self._fetchNextPage()
  File "/usr/local/lib/python3.13/site-packages/github/PaginatedList.py", line 324, in _fetchNextPage
    return self._getPage(data, headers)
           ~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/github/PaginatedList.py", line 357, in _getPage
    self.__contentClass(self.__requester, headers, self._transformAttributes(element))  # type: ignore
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: PullRequest.get_pr_comments.<locals>.get_element() missing 1 required positional argument: 'completed'

I believe it is connected to the posting mechanism of clang-tidy-review. More details can be seen here.

Looks like #142 is a possible fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant