Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-106217: Truncate the issue body size ofnew-bugs-announce-notifier#106329

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hugovk merged 2 commits intopython:mainfromsobolevn:issue-106217
Jul 2, 2023

Conversation

sobolevn
Copy link
Member

@sobolevnsobolevn commentedJul 2, 2023
edited by bedevere-bot
Loading

Copy link
Member

@hugovkhugovk left a comment

Choose a reason for hiding this comment

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

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@hugovkhugovk merged commit5950e7d intopython:mainJul 2, 2023
carljm added a commit to carljm/cpython that referenced this pull requestJul 3, 2023
* main: (167 commits)pythongh-91053: make func watcher tests resilient to other func watchers (python#106286)pythongh-104050: Add more type hints to Argument Clinic DSLParser() (python#106354)pythongh-106359: Fix corner case bugs in Argument Clinic converter parser (python#106361)pythongh-104146: Remove unused attr 'parameter_indent' from clinic.DLParser (python#106358)pythongh-106320: Remove private _PyErr C API functions (python#106356)pythongh-104050: Annotate Argument Clinic DSLParser attributes (python#106357)pythongh-106320: Create pycore_modsupport.h header file (python#106355)pythongh-106320: Move _PyUnicodeWriter to the internal C API (python#106342)pythongh-61215: New mock to wait for multi-threaded events to happen (python#16094)  Document PYTHONSAFEPATH along side -P (python#106122)  Replace the esoteric term 'datum' when describing dict comprehensions (python#106119)pythongh-104050: Add more type hints to Argument Clinic DSLParser() (python#106343)pythongh-106320: _testcapi avoids private _PyUnicode_EqualToASCIIString() (python#106341)pythongh-106320: Add pycore_complexobject.h header file (python#106339)pythongh-106078: Move DecimalException to _decimal state (python#106301)pythongh-106320: Use _PyInterpreterState_GET() (python#106336)pythongh-106320: Remove private _PyInterpreterState functions (python#106335)pythongh-104922: Doc: add note about PY_SSIZE_T_CLEAN (python#106314)pythongh-106217: Truncate the issue body size of `new-bugs-announce-notifier` (python#106329)pythongh-104922: remove PY_SSIZE_T_CLEAN (python#106315)  ...
@jkloth
Copy link
Contributor

jkloth commentedJul 4, 2023
edited by hugovk
Loading

It seems that now there is no body for any message sent via the notifier after this change. See thenew-bugs-announce archives forissue 106333 (has body) vs106334 (no body)

@hugovk
Copy link
Member

Aha, looking athttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring, the args are:

substring(indexStart)substring(indexStart,indexEnd)

indexStart
The index of the first character to include in the returned substring.

indexEnd Optional
The index of the first character to exclude from the returned substring.

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:

conststr='Mozilla';console.log(str.substring(4));// prints "lla"console.log(str.substring(8000));// prints ""

Instead we want something likeissue.data.body.substring(0, 8000) for the substring from 0 up to 8000.

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?

@sobolevn
Copy link
MemberAuthor

Oh my, js strikes again 🤦

hugovk reacted with laugh emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@hugovkhugovkhugovk approved these changes

@ezio-melottiezio-melottiAwaiting requested review from ezio-melottiezio-melotti is a code owner

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@sobolevn@jkloth@hugovk@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp