Skip to content

Commit

Permalink
Revert "allow to strip webhooks uuids"
Browse files Browse the repository at this point in the history
This reverts commit c154187.
  • Loading branch information
Jesus-Osuna-M committed Jan 22, 2024
1 parent 9ae58c9 commit 7be9db3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@ Call<ProjectImportStatus> importProjectArchive(
@Query("importScm") Boolean importScm,
@Query("importWebhooks") Boolean importWebhooks,
@Query("whkRegenAuthTokens") Boolean whkRegenAuthTokens,
@Query("whkRegenUuid") Boolean whkRegenUuid,
@Query("importNodesSources") Boolean importNodesSources,
@Query("asyncImport") Boolean asyncImport,
@QueryMap Map<String,String> params,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ static class ArchiveImportOpts extends BaseOptions{
@CommandLine.Option(names = {"-t", "--regenerate-tokens"}, description = "regenerate the auth tokens associated with the webhook in import, default: false (api v34 required)")
boolean whkRegenAuthTokens;

@CommandLine.Option(names = {"-R", "--remove-webhooks-uuids"}, description = "Remove Webhooks UUIDs in import. Default: preserve webhooks UUIDs. (api v34 required)")
boolean whkRegenUuid;

@CommandLine.Option(names = {"-n", "--include-node-sources"}, description = "Include node resources in import, default: false (api v38 required)")
boolean includeNodeSources;

Expand Down Expand Up @@ -145,9 +142,6 @@ public int importArchive(@CommandLine.Mixin ArchiveImportOpts opts) throws Input
if ((opts.isIncludeWebhooks() || opts.isWhkRegenAuthTokens()) && getRdTool().getClient().getApiVersion() < 34) {
throw new InputError(String.format("Cannot use --include-webhooks or --regenerate-tokens with API < 34 (currently: %s)", getRdTool().getClient().getApiVersion()));
}
if ((opts.isIncludeWebhooks() || opts.isWhkRegenUuid()) && getRdTool().getClient().getApiVersion() < 34) {
throw new InputError(String.format("Cannot use --include-webhooks or --remove-webhooks-uuids with API < 34 (currently: %s)", getRdTool().getClient().getApiVersion()));
}
if ((opts.isIncludeNodeSources()) && getRdTool().getClient().getApiVersion() < 38) {
throw new InputError(String.format("Cannot use --include-node-sources with API < 38 (currently: %s)", getRdTool().getClient().getApiVersion()));
}
Expand All @@ -174,7 +168,6 @@ public int importArchive(@CommandLine.Mixin ArchiveImportOpts opts) throws Input
opts.isIncludeScm(),
opts.isIncludeWebhooks(),
opts.isWhkRegenAuthTokens(),
opts.isWhkRegenUuid(),
opts.isIncludeNodeSources(),
opts.isAsyncImportEnabled(),
extraCompOpts,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ class ArchivesSpec extends Specification {
_,
_,
_,
_,
[
'importComponents.test-comp': 'true',
'importOpts.test-comp.key' : 'value',
Expand Down Expand Up @@ -202,7 +201,6 @@ class ArchivesSpec extends Specification {
_,
_,
_,
_,
[:],
_
) >> Calls.response(new ProjectImportStatus(resultsmap))
Expand Down

0 comments on commit 7be9db3

Please sign in to comment.