Repository navigation
Keep REST issue comment authors in resume-from-pr briefs - #165
Merged
Merged
Conversation
brief_from_github_rest passed GitHub/Gitea REST issue comments through raw, so brief_from_github_view looked for `author` on objects that keep the author under `user` and rendered an empty login. Map issue comments user -> author like reviews already are. Fixes #162 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #162
Root cause
brief_from_github_restpassed REST issue comments through unchanged asdata["comments"].brief_from_github_viewthen readcomment.get("author") or comment. REST comments keep the author underuser, sologin_ofreturned"". Bothfetch_github_apiandfetch_gitea_apitake this path.Fix
Normalize issue comments in
brief_from_github_rest(user→author,created_at→createdAt), the same way reviews are already mapped. Thegh pr viewpath is unchanged.Tests
brief_from_github_restgivesauthor == "ada", and bothending_textand the rendered### Comment — adaline include it. This test failed before the fix.gh-shaped comment still resolvesauthor.login.ending_text == "ada: comment 45"(it was": comment 45"), and the Gitea paging test asserts the author isada. Both failed before the fix.python3 -m pytest tests: 131 passed.fetch_github_apion Docs: split builtins to their own page from library python/cpython#156682 now gives 32 discussion comments, with no empty authors.🤖 Generated with Claude Code