fix(forge): issue view lists the files attached to an issue and its comments #4
No reviewers
Labels
No labels
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Tooling!4
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Tooling:fix/forge-issue-view-attachments"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
A bug report's log is usually an attachment, and
forge.py issue viewprinted only the issue's text, so a report with a log read as if it had none. This lists the attached files so the log can be found.What changed
issue view(and--comments) lists each file attached to the issue and to each comment asattached: "NAME" (SIZE) LINK, without downloading anything. The name and link are JSON-escaped, so a newline, escape code or odd character in a filename stays one printable line. A file the text already links (whatpr comment --attachleaves) is not listed twice. No new request: it reads theassetsthe two GETs already return.scripts/forge.py:show_attachments(), called bycmd_issueandshow_comments(); usage line updated.tests/test_forge_pr.py:test_issue_view_lists_the_attachments,test_attachment_names_and_links_are_escaped; the stand-in Forgejo answersGET /issues/N.docs/forge.md: a paragraph under Other commands.Ported from Longshot#298 by Amateurwizrd (MagicBeanDev/Longshot#298): forge.py moved to this repository (Tooling#1), so the change belongs here. The behaviour, tests and docs are the same as theirs, adapted to this repository's forge.py.
Testing
No tests were run on this PC (not the checks, not a single test). The original author ran
tests/test_forge_pr.py(34 pass) and the commands against the live tracker on Windows 11 in Longshot#298.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.