Skip to content

🐛 Don't render None as the backport PR body - #58

Merged
webknjaz merged 1 commit into
sanitizers:masterfrom
LuShadowX:none-body
Jul 27, 2026
Merged

webknjaz merged 1 commit into
sanitizers:masterfrom
LuShadowX:none-body

Conversation

@LuShadowX

Copy link
Copy Markdown
Contributor

pull_request['body'] is null for PRs submitted without a description, so the f-string interpolated the string None into the backport PR description.

Live example from #49: aio-libs/aiohttp#11772 ends with

**This is a backport of PR #11771 as merged into master (72fadb8f1a56e8bff0fef23ccf02e2067cd87e41).**

None

Now the original description is only appended when there is one. Output is unchanged for PRs that do have a body; the empty-string case also stops emitting a trailing blank block.

Fixes #49.

@webknjaz webknjaz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright.. I suppose this is a good solution for now. I wasn't sure what to do with this case originally (whether to display some explanatory text or a hidden html comment for troubleshooting). Plus not having tests in the project doesn't make it a good environment for first time contributors. So I won't request additional work on top here. Thanks!

However, if you'd like to work on some test infra for this bot — more PRs are welcome.

@webknjaz
webknjaz merged commit 8085e87 into sanitizers:master Jul 27, 2026
1 check failed
@LuShadowX

Copy link
Copy Markdown
Contributor Author

Thanks for the review and merge! #57 is still open if it's useful, and if there's anything else here you'd like picked up, feel free to ping me.

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

Successfully merging this pull request may close these issues.

Check for description being None when composing PR description

2 participants