npm从github pull请求安装 [英] npm install from github pull request

查看:114
本文介绍了npm从github pull请求安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

npm安装文档中查看,它可能会从github repo中安装npm。



是否也可以从拉取请求中专门安装?



解决方案只是基于拉请求的最后一个提交(最后一个)?

解决方案

GitHub维护一个 namespace 为原始回购中的每个PR,所以这也适用:

  npm install< ; user> /< repo>#pull /< id> / head 




注意:它不能与NPM v。5一起工作。请参阅 $ b

例如:

  npm i --save-dev json-schema-faker / json-schema-faker#pull / 129 / head 

或使用纱线

  yarn add< user> /< repo>#< id> / head 


$ b

 yarn add json-schema-faker / json -schema-FAK er#129 / head 

请注意,在Yarn情况下,没有



如果您需要自动删除PR所在的安装或repo /分支,这可能会有所帮助。另见修改一个在GitHub上本地停用拉动请求

Loooking at the npm install docs it looks possible to npm install from a github repo.

Is it also possible to install specifically from a pull request?

Is the solution just to install based on the last commit (last sha) of the pull request?

解决方案

GitHub is maintaining a namespace for each PR in the original repo, so this works as well:

npm install <user>/<repo>#pull/<id>/head

NOTE: It doesn't seeem to be working with NPM v. 5. See the comment below.

for example:

npm i --save-dev json-schema-faker/json-schema-faker#pull/129/head

or with yarn:

yarn add <user>/<repo>#<id>/head

for example:

yarn add json-schema-faker/json-schema-faker#129/head

Note that in Yarn case there is no pull/ segment in the package identifier.

This may be helpful if you need to automate the installation or repo / branch from where PR is originating is removed. See also Modifying an inactive pull request locally at GitHub.

这篇关于npm从github pull请求安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆