Respect dry run for token remote update
This commit is contained in:
+6
-2
@@ -236,8 +236,8 @@ Dozwolone kierunki:
|
||||
- `tokens update --from store`
|
||||
|
||||
`tokens update --from remotes` kopiuje tokeny z remote URL-i repo do
|
||||
`tokens.json`. `tokens update --from store` kopiuje wybrany token z
|
||||
`tokens.json` do remote URL-a repo.
|
||||
`tokens.json`. Z `--dry-run` dziala jak read-only raport. `tokens update
|
||||
--from store` kopiuje wybrany token z `tokens.json` do remote URL-a repo.
|
||||
|
||||
Przyklad:
|
||||
|
||||
@@ -259,6 +259,10 @@ Jesli:
|
||||
- token jest i tu, i tu, ale wartosci sa rozne
|
||||
wybierz kierunek jawnie przez `tokens update --from ...`
|
||||
|
||||
Przy `tokens update --from remotes` mozna uzyc:
|
||||
|
||||
- `--dry-run`
|
||||
|
||||
Przy `tokens write` i `tokens update --from store` mozna uzyc:
|
||||
|
||||
- `--replace`
|
||||
|
||||
@@ -1460,6 +1460,9 @@ def run_tokens_write(config: WorkspaceConfig, args: argparse.Namespace) -> None:
|
||||
|
||||
def run_tokens_update(config: WorkspaceConfig, args: argparse.Namespace) -> None:
|
||||
if args.from_source == "remotes":
|
||||
if args.dry_run:
|
||||
run_tokens_scan(config, args)
|
||||
return
|
||||
repo_path = resolve_repo_argument(args.repo)
|
||||
report = sync_tokens_from_repo(config, repo_path)
|
||||
repo_root, repo_servers = collect_repo_server_entries(config, repo_path)
|
||||
|
||||
Reference in New Issue
Block a user