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

Add links back to bugs.python.org #28

Closed
brettcannon opened this issue Feb 15, 2017 · 8 comments
Closed

Add links back to bugs.python.org #28

brettcannon opened this issue Feb 15, 2017 · 8 comments

Comments

@brettcannon
Copy link
Member

When the bpo-\d+ pattern is picked up in a comment we should rewrite it to be linked to bugs.python.org appropriately. And if the link is detected in the title then a link should be added as a comment on the PR.

@soltysh
Copy link
Collaborator

soltysh commented Feb 24, 2017

Sign me up for this :)

@brettcannon
Copy link
Member Author

And FYI we have a PSF account on Heroku so I would just write any bot to be hosted there to make writing this easier. (I also wonder if there isn't a bot somewhere that does this already? Quite possibly not but a quick Google search wouldn't hurt.)

@soltysh
Copy link
Collaborator

soltysh commented Feb 25, 2017

Roger that.

@jaraco
Copy link
Member

jaraco commented Mar 25, 2017

Is there currently any art on which this effort could be based or does it need to be engineered from scratch?

@jaraco
Copy link
Member

jaraco commented Mar 25, 2017

Until we have a service that can re-write the source, I've developed this greasemonkey script that will inject links:

// ==UserScript==
// @name Link bugs.python.org
// @include https://github.com/python/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js
// @grant none
// ==/UserScript==

$(".comment-body").html(
    function () {
       return $(this).html().replace(/(bpo-(\d+))/, '<a href="https://bugs.python.org/issue$2">$1</a>');
    }
);

@brettcannon
Copy link
Member Author

@jaraco it doesn't need to be from scratch, it just needs to be easily deployed and maintained.

I should also mention that there's a possibility of making this a status check where the "Details" link would point to the issue itself (it's an idea I have in the back of my head that I'm still thinking through).

@ezio-melotti
Copy link
Member

FTR @berkerpeksag wrote https://github.com/berkerpeksag/cpython-bpo-linkify

@brettcannon
Copy link
Member Author

Bedevere is now doing this indirectly through a status check for issue numbers.

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

No branches or pull requests

4 participants