-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2: Implement git module #3171
Comments
Currently implementing the module using the git bindings for go.
|
Something to consider: src-d/go-git#1295 Perhaps the hard fork is a better dependency for now: https://github.com/go-git/go-git Also, to clarify, this plugin will be hosted in a separate repository. You're welcome to track it here until your repo is pushed, though, I guess. Thanks for working on this! Have fun with it! |
There are a few things I wanted to discuss. The following is the struct that implements the module: type Git struct {
// URL of the git repository.
Repo string `json:"repo"`
// Path to clone the repository in.
//
// Defaults to site root. Can be absolute or relative to site root.
Path string `json:"path,omitempty"`
// Branch or tag of the repository to clone.
//
// Defaults to master. `{latest}` can be used as a
// placeholder for latest tag which ensures the most recent tag is
// always pulled.
Branch string `json:"branch,omitempty"`
// Git access token required for private repositories.
Token string `json:"token,omitempty"`
// Depth of commits to fetch.
Depth int `json:"depth,omitempty"`
// Interval is the number of seconds between pulls.
//
// Defaults to 3600 (1 hour). Minimum interval is 5. An interval
// of -1 disables periodic pull.
Interval int `json:"interval,omitempty"`
} Can we rename Secondly, any other suggestions in this? The webhook part I'll implement later on. Also, I've added access token option for private repos. I'll also add the option for fetching using private key. (IMO using access tokens is a better way) |
Great start!
Yes! That's a better name IMO.
So far:
|
ping @abiosoft |
Hmm, what's the reasoning for this? IMO
@mholt pretty sure this isn't the same kind of placeholder in the Caddy sense, it's just an internal magic value if I'm reading correctly. |
I think "tree" is more technically accurate, and makes it a little clearer that you're not limited to just branch names. I'm not particularly opinionated about the name of that field tbh.
I'm not so sure, it seems like something exposed to the user. |
Be aware of the edge case presented by relative SSH URLs if you rely on |
Closing, since this is now being tracked at https://github.com/vrongmeal/caddygit |
Creating this issue to track progress for git module similar to the v1 git plugin.
The text was updated successfully, but these errors were encountered: