Skip to content

Commit

Permalink
Added minder provider update CLI command.
Browse files Browse the repository at this point in the history
Update command allows changing configuration for provider on a
per-field basis. It operates on a read-modify-write fashion,
retrieving current configuration from the backend for modification.

Modification is done by reflection by walking over the struct's JSON
tags. Implementation is recursive, but the maximum depth is determined
by the deepest field in the configuration struct.

Argument parsing is trivial and assumes that arguments are either of
the form `field1.field2.field3` (for `--unset-attribute`) or
field1.field2.field3=value` (for `--set-attribute`). The right parser
for `value` is determined once the correct struct field is found.

It is not currently possible to modify `"github-app"` or `"github"`
fields.

Fixes #3509
  • Loading branch information
blkt committed Jun 19, 2024
1 parent cfeaed8 commit 5992af8
Show file tree
Hide file tree
Showing 2 changed files with 1,051 additions and 0 deletions.
Loading

0 comments on commit 5992af8

Please sign in to comment.