GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — gh-106217: Truncate the issue body size of `new-bugs-announce-notifier` by sobolevn · Pull Request #106329 · python/cpython Conversation
|
|
It seems that now there is no body for any message sent via the notifier after this change. See the new-bugs-announce archives for issue 106333 (has body) vs 106334 (no body) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Aha, looking at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring, the args are: substring(indexStart) substring(indexStart, indexEnd)
So: issue.data.body.substring(8000) is attempting to get the substring from char number 8000 up to the end, meaning we lose the first 8000 chars, and get an empty string if there's nothing beyond that. For example: const str = 'Mozilla'; console.log(str.substring(4)); // prints "lla" console.log(str.substring(8000)); // prints "" Instead we want something like console.log(str.substring(0, 4)); // "Mozi" console.log(str.substring(0, 8000)); // "Mozilla" Does that look right? Would you like to make a new PR? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Oh my, js strikes again 🤦 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.