Skip to content
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

Patch command #89

Open
g4s8 opened this issue Oct 5, 2021 · 0 comments
Open

Patch command #89

g4s8 opened this issue Oct 5, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@g4s8
Copy link
Owner

g4s8 commented Oct 5, 2021

Let's introduce a new command patch: it'll update an existing remote resource without downloading the full spec file. It can accept patch file or patch statements. For patch command it automatically create spec in memory, update it using patch file or statements and modify remote resources according to these changes.

Patch file provides yaml representation of fields that should be updated, e.g. gitstrap patch -f repo.yml g4s8/gitstrap with repo.yml file's content:

spec:
  description: "New repository description"

will change repository description of g4s8/gitstrap repo.

Patch statements can modify specs without editing file. Each statement should be valid YAML document, it should accept one-line documents. E.g. gitstrap patch -s 'spec: { visibility: private }' g4s8/gitstrap changes visibility of repository to private. Patch command can accept one or more statements at once, and one or more changes in one statement: e.g.

gitstrap patch \
  -s 'spec: { visibility: private, license: MIT }' \
  -s 'spec: { features: [issues, pages] }' \
  g4s8/gitstrap
@g4s8 g4s8 added the enhancement New feature or request label Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant