Availity / availity-workflow

Upgradable workflow for Availity boilerplate projects
https://availity.github.io/availity-workflow
MIT License
28 stars 16 forks source link

Privately hosted templates are not supported #432

Open djejaquino opened 4 years ago

djejaquino commented 4 years ago

🐛 Bug report

Current Behavior

Running a npx @availity/worflow init command with -t or --template parameter, using a privately hosted starter will abort the process.

Expected behavior

To successfully initialize an updated workflow-based project.

Reproducible example

image

Suggested solution(s)

Assume static hostedInfo for https://code.availity.com, to support (at least) Availity-provided repositories.

Additional context

https://github.com/Availity/availity-workflow/blob/12c486b9253361a5ec486e6e900f9a473e6b33cf/packages/workflow/scripts/clone-starter.js#L64

Your environment

  Binaries:
    Node: 8.9.4 - C:\Program Files\IBM\node\node.EXE
    Yarn: 1.22.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 5.6.0 - C:\Program Files\IBM\node\npm.CMD

EDIT: grammar

nylon22 commented 3 years ago

Some background on this. We use a library: https://github.com/npm/hosted-git-info, to get metadata about the git url passed in via the template option before cloning it. You can see that here:https://github.com/Availity/availity-workflow/blob/2e57fc9edcc27b59c85576b1bddd5fbb3373efb5/packages/workflow/scripts/clone-starter.js#L59-L65

That library does not support https://code.availity.com. I see two paths forward here:

  1. The library does support pull requests for new hosts. We could add this host.
  2. We can remove the dependency on that library and do what it does in-house.
nylon22 commented 3 years ago

Related: https://github.com/npm/hosted-git-info/issues/39