atom / settings-view

🔧 Edit Atom settings
MIT License
273 stars 275 forks source link

Enhanced the report issue link derivation to respect the package.json bugs property #1093

Closed maralv closed 5 years ago

maralv commented 5 years ago

The existing implementation ignores the package.json bugs property, when deriving the report issue link. The proposed solution checks if the bugs property is a string or an object, if it's an object it's parsed for an URL or email, according to the NPM package specification. The repository issue URL is used as fallback.

Requirements

None.

Description of the Change

Replaces the old getRepositoryUrl with a new getRepositoryBugUri that respects the bugs property in package.json.

Alternate Designs

None.

Benefits

For Atom packages using an issue tracker outside of GitHub or an email, the Report Issue button will now link to the correct place.

report-issue-button

Possible Drawbacks

As the proposed solution uses the old solution as fallback, there's no identified drawbacks.

Applicable Issues

966

1040

rsese commented 5 years ago

Thanks @maralv! Can you add tests for this?

maralv commented 5 years ago

I can surely give it a try! :)

maralv commented 5 years ago

Succeeded Tests

:bug: Please review the minor fix in commit 37445ba, it seems to be an old issue. :white_check_mark: The added tests cover all new code and pass successfully.

rsese commented 5 years ago

Thank you! Someone from the team will take a look as soon as they can.

maralv commented 5 years ago

Thank you! Someone from the team will take a look as soon as they can.

Would appreciate a review, thank you!