pyupio / pyup

A tool to update your project's dependencies on GitHub. Runs on pyup.io, comes with a command line interface.
https://pyup.io
MIT License
454 stars 67 forks source link

URL in changelog broken by issue number redaction #310

Closed edmorley closed 4 years ago

edmorley commented 6 years ago

Hi

In this PR: mozilla/treeherder#3784

The changelog section contains this URL: https://django-filter.readthedocs.io/en/master/guide/migration.htmlmigrating-to-2-0

Whereas the actual URL in the original changelog is: https://django-filter.readthedocs.io/en/master/guide/migration.html#migrating-to-2-0

I'm presuming the # was removed by the process that sanitizes the GitHub issue numbers (ie converts #123 to 123).

Please could the regex be tightened up, to avoid false positives?

Jwomers commented 6 years ago

@edmorley Got it, thanks.

Jwomers commented 6 years ago

@edmorley tracked this down to our open source changelogs repo: https://github.com/pyupio/changelogs/blob/0cdb929ac4546c766cd7eef9ae4eb4baaa08f452/changelogs/parser.py#L35

I should get to this in the next few days.

cc @jayfk for context.

Jwomers commented 6 years ago

@edmorley I have created a PR with a fix here: https://github.com/pyupio/changelogs/pull/139/files

@jayfk did you want to strip #'s from GitHub issue numbers? If so, I can update the regex accordingly.

jayfk commented 6 years ago

@Jwomers The thing is that links to GitHub issues create quite some noise. There were a couple of issues in the past that had hundred of references from unrelated issues created by the bot.

In most cases this is not a problem because the issues are closed. But if there's an issue where people are still working on a fix and are discussing changes, it's distracting to see all these pull request references.

That's why I stripped these comments out.

jayfk commented 6 years ago

But if you are working on a better regex, it should be pretty simple to just make sure that the line does not contain github.com.

Jwomers commented 6 years ago

@jayfk got it, so I will add a regex to replace#[0-9]* with [0-9]* 👍

rafaelpivato commented 4 years ago

Thanks for all information shared, guys. Fixed with https://github.com/pyupio/changelogs/pull/139

Should be available with next release to PyPi.