devstream icon indicating copy to clipboard operation
devstream copied to clipboard

🍀 `Proposal`: enhance github repo create action

Open JaneLiuL opened this issue 2 years ago • 2 comments

Description

could we add github repo and use our own template instead of default template? also could we setup the repo as internal options?

Describe the Proposal

A clear and concise description of what you would like.

Has the Feature been Requested Before?

Please link related issues here, if any.

Describe the Alternatives You Have Considered

A clear and concise description of any alternative solution or feature you've considered.

Additional Context

Add any other helpful context or screenshots about the feature request here.

JaneLiuL avatar Mar 03 '22 10:03 JaneLiuL

Thanks for your feedback. Firstly, it is impossible for DevStream to understand an unknown template. However, we provide a plugin mechanism, you can develop your own plugin according to the DevStream specification, and implement custom template parsing in this plugin.

See https://github.com/merico-dev/stream/blob/main/docs/creating_a_plugin.md for more info.

daniel-hutao avatar Mar 03 '22 11:03 daniel-hutao

@JaneLiuL We use Golang to render the templates. For example, this is the template we have been using.

When defining the templates, you need to set some "placeholders", and when rendering the template, you need to know what variables to pass to those placeholders as values.

Because of this nature, this plugin currently can't support a user-defined template.

However, this might be possible. @daniel-hutao For example, the users could pass a link to the template location, and the users could set the values in the options section of the config.

@JaneLiuL Thanks again for this valuable suggestion; we will have a discussion about it and let you know the result as soon as possible!

There is another way, which is as Daniel said, if you are interested, you can create a custom plugin for it, but bear in mind that the plugin should be not too specific to your own project because the plugins are supposed to work for most of the communities.

IronCore864 avatar Mar 04 '22 01:03 IronCore864

we have finished this func in repo-scaffolding, you can refer to this doc.

steinliber avatar Oct 08 '22 03:10 steinliber