jwage / changelog-generator

Generate a markdown changelog document from a GitHub milestone.
MIT License
101 stars 8 forks source link

`urlencode` is applied to Issue/PR title #68

Open boesing opened 3 years ago

boesing commented 3 years ago

Hey there,

I've released v2.0.0 of laminas/laminas-httphandlerrunner and realized, that urlencode is applied to the title of a PR and Issue.

Actually, the titles are used as a descriptive link-text and thus, should not be encoded because they're not part of the URL itself.

17: feature: Add additional headers_sent informations to the EmitterException [...]

I've had a quick view over the source code but could not directly find the corresponding lines. Will have a deeper dive somewhen in the future and will create an bugfix if not done by any other consumer already.

boesing commented 3 years ago

Okay, I've found the corresponding lines: https://github.com/jwage/changelog-generator/blob/cd4d35ebfb78d6350c45ffc5a3445e53ed813a03/src/ChangelogGenerator/IssueFactory.php#L35

Is there any specific reason why the title needs to get replaced like this?

WyriHaximus commented 3 years ago

Seems to be introduced in #29 to resolve #27

boesing commented 3 years ago

I guess this was made to avoid having markdown conflicts. Maybe a more complex regular expression should be applied first while replacing the corresponding matches rather than the whole title? What do you think?

WyriHaximus commented 3 years ago

@boesing That should do the trick, and probably also use a dataprovider for that changed tests and toss several scenarios at it.