-
-
Notifications
You must be signed in to change notification settings - Fork 60
Blurb: validate GitHub issue number #504
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
Comments
Blurb twice says it wants a gh # and an issue #. Would be nice if it could enforce both, at least when online.
'here' should be changed to 'below'. |
I can work on this. |
Getting back to this @hugovk, after some research seems like we can follow two different directions here. The validation here, doesn't really resolve the case that the issue doesn't exist. This only checks if the issue, is less than the MINIMUM_ISSUE_NUMBER. We could the following:
I tend to like the first solution better, since it's getting to the root, which is |
Thanks for checking. Let's avoid network calls, because someone could be working offline. Instead, let's only check number is in the valid range. To begin with, we only had PRs on GitHub. We had another tracker for issues. So 1-32425 are only PRs. We have both issues and PRs for >= 32426. So PRs can be >= 32426, but an issue number must be >= 32426. So let's validate to make sure the number is >= 32426, that's good enough. It helps avoid using old PR numbers as issue numbers, that's the case we're mainly interested in here. |
Thanks @hugovk, I'll work on the fix. |
@menkotoglou Hi! Any luck on this? Do you need a hand with anything? |
Hey @hugovk, thank you very much for the reminder. Some personal issues didn't let me look into this. I'll be spending some time on this soon though. |
Thanks, no rush though, and just ask if you've any questions. |
The short story
It would be nice if we checked GitHub issue numbers are valid.
Long version
Thanks for blurb!
If you accidentally use an (old) GitHub PR number instead of the GitHub issue number, the CI docs build will fail:
Re:
This is validated in https://github.com/python/cpython/blob/616fcad6e2e10b0d0252e7f3688e61c468c54e6e/Doc/tools/extensions/pyspecific.py#L69-L79
Shall we add some validation to Blurb, to fail sooner?
We could also allow old BPO issue numbers similar to https://github.com/python/cpython/blob/616fcad6e2e10b0d0252e7f3688e61c468c54e6e/Doc/tools/extensions/pyspecific.py#L54-L63, but for new NEWS files created today, should we require only the corresponding GitHub issue number?
The text was updated successfully, but these errors were encountered: