Skip to content

Add initpkg tool to initialize a new package - #240

Open
kaniini wants to merge 5 commits into
mainfrom
feature/initpkg
Open

Add initpkg tool to initialize a new package#240
kaniini wants to merge 5 commits into
mainfrom
feature/initpkg

Conversation

@kaniini

@kaniini kaniini commented Jun 1, 2023

Copy link
Copy Markdown
Contributor

No description provided.

kaniini added 5 commits June 1, 2023 11:59
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
@kaniini
kaniini requested a review from a team as a code owner June 1, 2023 21:23
@kaniini
kaniini requested review from ajayk and jdolitsky and removed request for a team June 1, 2023 21:23
Comment thread pkg/initpkg/context.go

// InterpretURI interprets the provided source code URI and fills in project
// information as well as pipeline instructions in how to fetch the sources.
func (ctx *Context) InterpretURI(uri string) error {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not use ctx as a receiver because it collides with the idiomatic name forcontext.Context parameters.

(I'd also rename the struct from Context to something else so we don't have a dozen different flavors of Context floating around, but that's less important than the receiver name.)

Comment thread pkg/initpkg/context.go
Version string
License string
Layout string
WorkDir string

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider having Context taking a WorkFS parameter so it's more easily tested with an apkfs.FullFS or something instead of always writing to disk.

@luhring luhring left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🎸

Docs on how to use w/ example(s) would be awesome! 🙏

Comment thread pkg/initpkg/context.go
return err
}

ctx.Build.Package.Description = "TODO"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can get the description from the repos API: https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28 (if given project path is GitHub)

@Dentrax

Dentrax commented Jun 26, 2023

Copy link
Copy Markdown
Member

Hey @kaniini! I'm looking forward to get this PR merged. So we can iterate the features over time. Is there anything we should do?

justinvreeland pushed a commit to justinvreeland/wolfictl that referenced this pull request Mar 26, 2025
Co-authored-by: EyeCantCU <18015150+EyeCantCU@users.noreply.github.com>
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.

4 participants