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

Link to GitHub #74

Closed
Bankaifan opened this issue Apr 5, 2018 · 2 comments
Closed

Link to GitHub #74

Bankaifan opened this issue Apr 5, 2018 · 2 comments

Comments

@Bankaifan
Copy link

Hey, would it be possible to make an link to the regarding github-link like the already available NPM-Link?

@pierrejochem
Copy link

pierrejochem commented Apr 5, 2018

@oznu: It should be easily possible. It is included in the npm registry request but not defined in your service.

"versions": {
    ...
      "repository": {
        "type": "git",
        "url": "git+https://github.com/XXX/YYY.git"
      },
.....

@Bankaifan: If you are able to do it by your own then you just need to adapt the follwing files:

==> homebridge-config-ui-x/src/pm.ts (getting the details from npm registry)
==> homebridge-config-ui-x/ui/src/app/plugins/plugins.component.html (view template)

I'm pretty sure that pull requests are welcome here ;-)

@oznu
Copy link
Member

oznu commented Apr 5, 2018

Thanks @pierrejochem. The original reason I did not include this was some plugin owners weren't adding their repository attributes in the package.json, and some even used BitBucket (why would you...?).

Thehomepage attribute might be more universal. NPM will usually set this to be the url of the GitHub project page if npm has been told which repo it is:

npm view homebridge-config-ui-x homepage
# https://github.com/oznu/homebridge-config-ui-x#readme

But it also handles the BitBucket exceptions:

npm view homebridge-plugin-chromecast homepage
# https://bitbucket.org/robertherber/homebridge-chromecast#readme

The upside of doing it this way would be that it matches what npmjs.org displays.

@oznu oznu closed this as completed in 951bcd2 Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants