PR and bpo issue

Hi,

I was reviewing an open issue (https://bugs.python.org/issue36338) and seeing there was a merged PR, I wanted to check with my test and close the issue after validation. Unfortunately, my test failed because the associated PR was not related to the issue.

How can we avoid this situation?

When bedevere adds the url of the bpo issue, maybe it could also add the title of the issue (from bpo) in the PR like that

https://bugs.python.org/issue36338 : urlparse of urllib returns wrong hostname

and the double check from the contributor|core-dev could be easier.

With the titles of the PR and the issue, we could check if there is a matching or not.

PR: "bpo-36368: Ignore SIGINT in SharedMemoryManager servers".
BPO: "urlparse of urllib returns wrong hostname"

Is it relevant? and what do you suggest for this kind of situation?

Thank you.

I’m not aware if there is an easy way to retrieve the issue title from bpo, other than scraping the page (this is a slow operation).

Maybe a new JSON template like for the CLA check app.

There is the XML-RPC access:

http://roundup.sourceforge.net/docs/xmlrpc.html

Yep I also use it for some scripts

Ah, ok, it’s good to know that we can pull the issue title easily.
However, I’m don’t think copying over bpo title to GitHub PR is good idea.
What if the bpo title was changed after the PR was created?

There is an open issue about this (https://github.com/python/bugs.python.org/issues/25): if someone accidentally put in the wrong bpo number, it would be great if the wrong PR gets unlinked in bpo.

3 Likes

Example

import argparse
import os
import xmlrpc.client
from pprint import pprint as pp

USERNAME = os.environ["BPO_USERNAME"]
PASSWORD = os.environ["BPO_PASSWORD"]
HOSTNAME = "bugs.python.org"
URL = f"https://{USERNAME}:{PASSWORD}@{HOSTNAME}/xmlrpc"


def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("issue_id", type=int)
    args = parser.parse_args()

    with xmlrpc.client.ServerProxy(URL, allow_none=True) as proxy:
        response = proxy.display(f"issue{args.issue_id}", "title", "id")
        pp(response)


if __name__ == "__main__":
    main()

When I have written my initial message, I have thought about this issue. I haven’t yet read the content of your link but maybe there is a solution, thank you for the link.