Skip to content

Commit

Permalink
chore: remove environment parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
daveleek committed Feb 12, 2024
1 parent ff4e496 commit fb10789
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
5 changes: 0 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ inputs:
description: 'URL to Unleash Edge or frontend API'
type: 'string'
required: true
environment:
description: 'The environment for which to evaluate the feature flags'
type: 'string'
required: false
default: 'default'
is-enabled:
description: 'Newline-separated list of feature flag names to evaluate'
type: 'string'
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { getInput, getMultilineInput, setOutput } from '@actions/core';
const appName = getInput('app-name');
const url = getInput('url');
const clientKey = getInput('api-key');
const environment = getInput('environment');

const context: Record<string, string> = {};
const contextLines = getMultilineInput('context');
Expand All @@ -20,7 +19,6 @@ createUnleashAction({
url: url,
clientKey: clientKey,
appName: appName,
environment: environment,
context: context,
features: features,
variants: variants,
Expand Down
2 changes: 0 additions & 2 deletions src/unleash-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ interface ICreateUnleashActionOptions {
url: string;
clientKey: string;
appName: string;
environment: string;
context: Record<string, string>;
features?: string[];
variants?: string[];
Expand Down Expand Up @@ -41,7 +40,6 @@ const createClient = (options: ICreateUnleashActionOptions): UnleashClient => {
appName: options.appName,
url: options.url,
clientKey: options.clientKey,
environment: options.environment,
refreshInterval: 0,
metricsInterval: 0,
disableMetrics: true,
Expand Down
6 changes: 0 additions & 6 deletions test/unleash-action.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ test('checks features', async () => {
url: 'http://localhost:3000',
clientKey: 'client-1',
appName: 'test-app',
environment: 'test',
context: {},
features: ['feature-1'],
setResult: (name, value) => {
Expand Down Expand Up @@ -63,7 +62,6 @@ test('checks variants', async () => {
url: 'http://localhost:3000',
clientKey: 'client-1',
appName: 'test-app',
environment: 'test',
context: {},
variants: ['variant-1'],
setResult: (name, value) => {
Expand Down Expand Up @@ -94,7 +92,6 @@ test('end calls sendMetrics and stop', async () => {
url: 'http://localhost:3000',
clientKey: 'client-1',
appName: 'test-app',
environment: 'test',
context: {},
variants: ['variant-1'],
setResult: () => {},
Expand Down Expand Up @@ -131,7 +128,6 @@ test('counts features and variants', async () => {
url: 'http://localhost:3000',
clientKey: 'client-1',
appName: 'test-app',
environment: 'test',
context: {},
features: ['feature-1', 'feature-2'],
variants: ['variant-1'],
Expand Down Expand Up @@ -169,7 +165,6 @@ test('doesnt set variant result if variant is not enabled', async () => {
url: 'http://localhost:3000',
clientKey: 'client-1',
appName: 'test-app',
environment: 'test',
context: {},
variants: ['variant-1'],
setResult,
Expand Down Expand Up @@ -208,7 +203,6 @@ test('sets feature result to false if feature is not enabled', async () => {
url: 'http://localhost:3000',
clientKey: 'client-1',
appName: 'test-app',
environment: 'test',
context: {},
features: ['feature-1'],
setResult,
Expand Down

0 comments on commit fb10789

Please sign in to comment.