intersystems / git-source-control

Server-side source control hooks for InterSystems' platforms to facilitate use of git, especially in shared and/or remote development environments and for interoperability graphical editors
12 stars 8 forks source link

Document programmatic configuration #262

Open eduard93 opened 1 year ago

eduard93 commented 1 year ago

Would it be possible to add non-interactive alternative to SourceControl.Git.API:Configure, especially SourceControl.Git.Settings:Configure. I want to provide all values in a script.

isc-tleavitt commented 1 year ago

@eduard93 you could just get a new instance of SourceControl.Git.Settings, set properties of it, and then call %Save().

isc-tleavitt commented 1 year ago

That said, we should document how to do that and make it part of the official API (from a semantic versioning perspective).

eduard93 commented 1 year ago

Would that be enough? I looked at the method generator in SourceControl.Git.Settings:Configure and it looked like it just prompted for values, but I want to be sure.

isc-tleavitt commented 1 year ago

It does that and some other interactive things based on what's changed.

Ultimately there are enough settings that the API should be an object anyway, rather than a method with a growing # of parameters.

Leaving this issue open open to flag the class as part of the API and document how to use it.