Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically hyperlinking of `bpo-` text sometimes causes confusion #136

Open
tirkarthi opened this issue Oct 17, 2018 · 10 comments
Open

Automatically hyperlinking of `bpo-` text sometimes causes confusion #136

tirkarthi opened this issue Oct 17, 2018 · 10 comments
Labels
bug

Comments

@tirkarthi
Copy link
Member

@tirkarthi tirkarthi commented Oct 17, 2018

Automatically changing bpo-DDDD to a link to bugs.python.org was introduced in #121 . It's a useful feature but there are a few cases where the PR was raised with wrong title format and while specifying the correct format and the bot rewrites bpo number in the text as a link causing confusion. It does rewriting without notification and thus the comments are silently overwritten unless OP re-reads it.

Example : While commenting the correct format in python/cpython#9906 (comment) bedevere changed bpo-34996: Add name parameter to proccess and thread pool to [bpo-34996](https://bugs.python.org/issue34996): Add name parameter to proccess and thread pool . The user was confused and changed the PR title with URL. Using backticks also doesn't stop the bot. Is there a way to specify bpo-DDDD without adding hyperlinks in the comments? Maybe this can be skipped in the backticks?

Another example where spaces have to be used to stop rewriting : python/cpython#9755 (comment)

Thanks

@terryjreedy
Copy link
Member

@terryjreedy terryjreedy commented Oct 17, 2018

These seem like rather isolated incidents to me. For 9906, the comment should have been much more specific. "In the title, change 'pbo' to 'bpo'. A core developer would (I hope) have just made the change, but I am guessing that you currently cannot . For 9755, the new contributor put the bpo number in the commit message, where it should not be, instead of in the title, where it belongs and where it is left alone.

But I agree that Bedevere should not rewrite inside backticks, as used in 9755.
(Since the PR numbers are already link above, I left '#' off to avoid adding backlink noise to the PRs. )

@danishprakash
Copy link

@danishprakash danishprakash commented Oct 17, 2018

I guess it would be suitable if the bot wouldn't auto-expand links in inline code blocks and mutliline code blocks. That should do the job. Are you working on this @tirkarthi?

For 9755, the new contributor put the bpo number in the commit message, where it should not be, instead of in the title, where it belongs and where it is left alone.

@terryjreedy I'm a bit confused when you say that, since I haven't put the bpo number in the commit message, I could be wrong here but could you clear this up for me?

@tirkarthi
Copy link
Member Author

@tirkarthi tirkarthi commented Oct 17, 2018

@danishprakash No, I am not working on this.

@terryjreedy Yes, I can see the feature being useful but it's just that it can be avoided inside the backticks. But it's just a suggestion though based on the two PRs and I am okay if this is not implemented.

Thanks

@ned-deily
Copy link
Member

@ned-deily ned-deily commented Oct 17, 2018

@terryjreedy I'm also confused by your comment. The problem in 9755 had nothing to do with the original contributor's PR; it's that the bot incorrectly altered the comments that Carol and I made.

@storymode7
Copy link
Contributor

@storymode7 storymode7 commented Oct 21, 2018

If nobody's working on it, I'd love to fix this.

@terryjreedy
Copy link
Member

@terryjreedy terryjreedy commented Oct 22, 2018

@danishprakash and @ned-deily I must have somehow gotten the impression from "regarding putting the bug tracker link in the commit message" that something about the tracker had been there and edited out. If untrue, I apologize. Changing the title generates an automatic edit comment. This seems not true of editing a comment.

There are two actions that are jointly confusing. Bedevere 'hyperlinks' in the sense of re-writing "bpo-12345" as the marked-up text "[bpo-12345](https://www.bugs.python.org/issue12345)". Github 'hyperlinks in the sense of replacing such marked-up text with an actual hyperlink: "bpo-12345". Github does not interpret markup within backticks, which is how I could display the markup bedevere writes and why the sample above looks like code. (To see what I wrote, click '...', Edit, and the 'Write' tab.) The title of this issue would be slightly clearer with 'Automatically hyperlinking' replaced by the more specific "Bedevere re-writing".

On my 9755 comment, I originally wrote I see "[3.6] bpo-34901" on this tab (but as normal text, not code text). Bedevere rewrote the quote of what I see as "[3.6] [bpo-34901](https://bugs.python.org/issue34901)" and since I did not originally use backticks, github converted the hyperlink markup to hyperlinked text: "[3.6] bpo-34901". No, I do not see a clickable hyperlink on the Firefox tab ;-).

@storymode7 Suppressing bedevere's rewriting at least within backticks is really needed. Since no one else has reported working on this, please go ahead.

@danishprakash
Copy link

@danishprakash danishprakash commented Oct 22, 2018

@storymode7 we're still discussing the possible way to go forward with this. As discussed in the other thread, It's preferred to have the bot leave code blocks untouched. I'm working on this but a solid decision from the core members is what's required before I submit any patch.

@storymode7
Copy link
Contributor

@storymode7 storymode7 commented Oct 22, 2018

@danishprakash sure. Let me know if I can be of any help.

danishprakash added a commit to danishprakash/bedevere that referenced this issue Dec 8, 2018
danishprakash added a commit to danishprakash/bedevere that referenced this issue Jan 9, 2019
@hugovk
Copy link

@hugovk hugovk commented Jan 13, 2019

Here's another example of the bot breaking marked-up code:

python/cpython#10021 (comment)

@brettcannon brettcannon added the bug label Apr 23, 2019
@Mariatta
Copy link
Member

@Mariatta Mariatta commented Oct 16, 2019

Autolinking is now supported by GitHub and I've enabled it in CPython.

Still working on removing the autolink in bedevere.
Related issue: python/core-workflow#361

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants
You can’t perform that action at this time.