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

Wrong issue links in plugin changelogs #12755

Closed
millette opened this issue Mar 22, 2019 · 6 comments
Closed

Wrong issue links in plugin changelogs #12755

millette opened this issue Mar 22, 2019 · 6 comments
Labels
type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change

Comments

@millette
Copy link
Contributor

Description

Links to issues appear wrong in many package changelogs. Gatsby's own is ok:
https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/CHANGELOG.md

But not so for the plugins, such as:
https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-image/CHANGELOG.md

Instead of markdown like:

[#12085](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-feed/issues/12085)

The manual link could be removed in favor of a simple:

#12085

Expected result

Should link issues to right (top-level) URLs.

For example: #10278

Actual result

Links to URLs like https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-image/issues/10278

The string tree/master/packages/gatsby-image/ shouldn't be there.

@millette millette changed the title Wrong issue links in changelogs Wrong issue links in plugin changelogs Mar 22, 2019
@millette millette added type: documentation An issue or pull request for improving or updating Gatsby's documentation type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change and removed type: documentation An issue or pull request for improving or updating Gatsby's documentation labels Mar 24, 2019
@pieh
Copy link
Contributor

pieh commented Mar 26, 2019

It does seem like default preset for generating our changelogs doesn't handle this correctly. My best guess is that it works for gatsby package because in package.json there we point to root of repo:

"repository": {
"type": "git",
"url": "git+https://github.com/gatsbyjs/gatsby.git"
},

And in gatsby-image we point to directory:

"repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-image",

It's probably time to fork changelog preset we use and do some customization

@millette
Copy link
Contributor Author

millette commented Mar 27, 2019

I searched a few times but have no idea where I could help with a fix. Any pointers would be appreciated.

UPDATE: Found https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-angular/CHANGELOG.md where it works as expected, and just as @pieh noted, their package.json repository field points at the top level (the actual repo).

@wardpeet
Copy link
Contributor

thanks for checking this out @millette

@pieh will we put the changelog fork in gatsby monorepo or make a separate one?

@gatsbot
Copy link

gatsbot bot commented Apr 17, 2019

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

Thanks for being a part of the Gatsby community! 💪💜

@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Apr 17, 2019
@millette millette added not stale and removed stale? Issue that may be closed soon due to the original author not responding any more. labels Apr 17, 2019
@DSchau
Copy link
Contributor

DSchau commented Apr 17, 2019

Bit of a doozy here. As @pieh notes, this works for the gatsby package because the repository URL is the base from which we construct our issues. For all others, the base is wrong because that's not actually where issues are filed in a monorepo.

There are (minimally) two solutions here:

  1. PR conventional-changelog to tweak the Handlebars template to account for this
    • See the start of this logic here, where a flag is set if the repository should be included, and then the associated Handlebars templates for how it's implemented
  2. Use the new directory field within the repository object, e.g. see chore(*): add directory details to the package.json of all packages #11145
    • This seems the lowest effort solution, but:
    • Not sure how well supported this is with npmjs.com and other functionality, e.g. npm open

I'd propose to solve this we investigate Option 2 more, since it seems a little lower effort (yay!) and seems to be a better solution going forward.

@moonmeister
Copy link
Contributor

closed by #15477. Existing links will be fixed in #15630

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change
Projects
None yet
Development

No branches or pull requests

6 participants