sunodo / sunodo

Sunodo monorepo
https://docs.sunodo.io
Apache License 2.0
21 stars 14 forks source link

feat: add --repository flag to sunodo create #465

Closed omidasadpour closed 2 weeks ago

omidasadpour commented 1 month ago

/close #387 /close #186

This PR adds --repository flag to sunodo create. by this, users can specify their own repository and branch. The flag supports github, gitlab, bitbucket and sourcehut SCM.

to test :

sunodo create test --template python --repository https://github.com/omidasadpour/sunodo-templates  --branch main

image

This PR fixed #186 problem:

image

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: 750d268a089062fc951807182b517583ddd32605

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------- | ----- | | @sunodo/cli | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2024 5:28am
www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2024 5:28am
endersonmaia commented 3 weeks ago

I tested with a gitlab.com repository and it failed.

❯ sunodo-dev create --template=javascript --repository=https://gitlab.com/endersomaia/sunodo-templates --branch=main js-gl
✖ Error creating application: Failed to download https://gitlab.com/endersomaia/sunodo-templates/-/archive/main.tar.gz: 403 Forbidden

I checked that the source is available at https://gitlab.com/endersonmaia/sunodo-templates/-/archive/main/sunodo-templates-main.tar.gz instead.

I don´t know where would be the place to fix, if our code or giget's code.

omidasadpour commented 3 weeks ago

I tested with a gitlab.com repository and it failed.

❯ sunodo-dev create --template=javascript --repository=https://gitlab.com/endersommaia/sunodo-templates --branch=main js-gl
✖ Error creating application: Failed to download https://gitlab.com/endersommaia/sunodo-templates/-/archive/main.tar.gz: 403 Forbidden

I checked that the source is available at https://gitlab.com/endersonmaia/sunodo-templates/-/archive/main/sunodo-templates-main.tar.gz instead.

I don´t know where would be the place to fix, if our code or giget's code.

your repo should be public

endersonmaia commented 3 weeks ago

I tested with a gitlab.com repository and it failed.

❯ sunodo-dev create --template=javascript --repository=https://gitlab.com/endersommaia/sunodo-templates --branch=main js-gl
✖ Error creating application: Failed to download https://gitlab.com/endersommaia/sunodo-templates/-/archive/main.tar.gz: 403 Forbidden

I checked that the source is available at https://gitlab.com/endersonmaia/sunodo-templates/-/archive/main/sunodo-templates-main.tar.gz instead. I don´t know where would be the place to fix, if our code or giget's code.

your repo should be public

It is public.

omidasadpour commented 3 weeks ago
❯ sunodo-dev create --template=javascript --repository=https://gitlab.com/endersommaia/sunodo-templates --branch=main js-gl

The repo URL U have set is not correct.

endersonmaia commented 3 weeks ago
❯ sunodo-dev create --template=javascript --repository=https://gitlab.com/endersommaia/sunodo-templates --branch=main js-gl

The repo URL U have set is not correct.

Yeah, anyway the final URL is looking at the wrong path.

omidasadpour commented 3 weeks ago

Yeah, anyway the final URL is looking at the wrong path.

Fixed !

sunodo create test --template python --repository https://gitlab.com/endersonmaia/sunodo-templates --branch main

image

tuler commented 2 weeks ago

We need to discuss how or if we will do this. Closing for now.