refactor: rename webhookSecretDefault to defaultWebhookSecret

Signed-off-by: @pawelmitka <pawel.mitka@brainly.com>
This commit is contained in:
@pawelmitka
2021-09-02 11:06:06 +02:00
parent 774b08a5c4
commit 5783b0dc27
3 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -120,7 +120,7 @@ export function createGithubActionsDispatchAction(options: {
// @public (undocumented)
export function createGithubWebhookAction(options: {
integrations: ScmIntegrationRegistry;
webhookSecretDefault?: string;
defaultWebhookSecret?: string;
}): TemplateAction<any>;
// Warning: (ae-missing-release-tag) "createPublishAzureAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
@@ -33,10 +33,10 @@ describe('github:repository:webhook:create', () => {
});
const integrations = ScmIntegrations.fromConfig(config);
const webhookSecretDefault = 'aafdfdivierernfdk23f';
const defaultWebhookSecret = 'aafdfdivierernfdk23f';
const action = createGithubWebhookAction({
integrations,
webhookSecretDefault,
defaultWebhookSecret,
});
const mockContext = {
@@ -73,7 +73,7 @@ describe('github:repository:webhook:create', () => {
config: {
url: webhookUrl,
content_type: 'form',
secret: webhookSecretDefault,
secret: defaultWebhookSecret,
insecure_ssl: '0',
},
});
@@ -116,7 +116,7 @@ describe('github:repository:webhook:create', () => {
config: {
url: webhookUrl,
content_type: 'form',
secret: webhookSecretDefault,
secret: defaultWebhookSecret,
insecure_ssl: '0',
},
});
@@ -137,7 +137,7 @@ describe('github:repository:webhook:create', () => {
config: {
url: webhookUrl,
content_type: 'json',
secret: webhookSecretDefault,
secret: defaultWebhookSecret,
insecure_ssl: '0',
},
});
@@ -158,7 +158,7 @@ describe('github:repository:webhook:create', () => {
config: {
url: webhookUrl,
content_type: 'form',
secret: webhookSecretDefault,
secret: defaultWebhookSecret,
insecure_ssl: '1',
},
});
@@ -179,7 +179,7 @@ describe('github:repository:webhook:create', () => {
config: {
url: webhookUrl,
content_type: 'form',
secret: webhookSecretDefault,
secret: defaultWebhookSecret,
insecure_ssl: '1',
},
});
@@ -200,7 +200,7 @@ describe('github:repository:webhook:create', () => {
config: {
url: webhookUrl,
content_type: 'form',
secret: webhookSecretDefault,
secret: defaultWebhookSecret,
insecure_ssl: '0',
},
});
@@ -21,9 +21,9 @@ type ContentType = 'form' | 'json';
export function createGithubWebhookAction(options: {
integrations: ScmIntegrationRegistry;
webhookSecretDefault?: string;
defaultWebhookSecret?: string;
}) {
const { integrations, webhookSecretDefault } = options;
const { integrations, defaultWebhookSecret } = options;
const octokitProvider = new OctokitProvider(integrations);
return createTemplateAction<{
@@ -90,7 +90,7 @@ export function createGithubWebhookAction(options: {
const {
repoUrl,
webhookUrl,
webhookSecret = webhookSecretDefault,
webhookSecret = defaultWebhookSecret,
events = ['push'],
active = true,
contentType = 'form',