Skip to content

Conversation

@obarcelonap
Copy link
Member

@obarcelonap obarcelonap commented Nov 29, 2024

Description

Closes adobe/aio-cli#695

Related Issue

Motivation and Context

In order to be able to use quickstarts in Github's Enterprise Server.

How Has This Been Tested?

Unit testing

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (fff2504) to head (4072a38).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #822   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           57        57           
  Lines         3337      3338    +1     
  Branches       646       647    +1     
=========================================
+ Hits          3337      3338    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@obarcelonap obarcelonap requested a review from shazron December 2, 2024 14:53
@purplecabbage
Copy link
Member

purplecabbage commented Dec 2, 2024

This looks good, however, I would prefer it be done without an additional flag.
The current implementation mimics npm install [<package-spec> ...] in the way it interprets the package-spec
For example:

  1. install an npm published + scoped package ( plus version options )
    npm i @adobe/aio-lib-state
  2. install from github user/repo ( plus numerous branch options )
    npm i adobe/aio-lib-state
  3. install from url (ssh)
    npm i git@github.com:adobe/aio-lib-state.git
  4. install from url (https)
    npm i git@github.com:adobe/aio-lib-state.git

I think we should similarly overload the --repo flag to support these cases.

@obarcelonap
Copy link
Member Author

obarcelonap commented Dec 3, 2024

@purplecabbage thanks for your feedback. I am not sure if we can mimic npm's behaviour since the repo option allows to reference specific directories (org/repo/dir)

In regards your examples:
opt 1 is out of the scope, because quickstarts are not published in any artifact repository
opt 2 is what is currently implemented
opt 3 and 4 would be feasible but from my perspective it would give the false impression that the plugin is using git clone command which is not. Actually I am not sure how we will reflect the subfolder in the repo for these cases.

I would not overcomplicate the implementation. This pull request seems a quick win for me to support github enterprise installation. While I agree your proposal is much nicer I believe it requires a redesign of the command specification which I am not sure if is worthy.

@obarcelonap
Copy link
Member Author

@shazron @purplecabbage can I get your feedback based on my last comment?

If still is desired to use the npm approach, I was wondering how a concrete example would look like.

# prefix with github enterprise server url
aio app init --repo mygithub.com:myorg/myrepo/myfolder

# by default uses github (current behaviour)
aio app init --repo adobe/appbuilder-quickstarts/dne 

Is that sufficient from your perspective?

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

Successfully merging this pull request may close these issues.

Customizable baseUrl on quickstarts

3 participants