Skip to content
This repository has been archived by the owner on Apr 1, 2022. It is now read-only.

Commit

Permalink
Add the concept of feature flags
Browse files Browse the repository at this point in the history
  • Loading branch information
jssblck committed Aug 26, 2021
1 parent b066992 commit 0a99c73
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/App/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ module App.Types (
ReleaseGroupMetadata (..),
ProjectRevision (..),
MonorepoAnalysisOpts (..),
FeatureFlag (..),
coreFlagName,
) where

import Data.Aeson (FromJSON (parseJSON), withObject, (.:))
Expand Down Expand Up @@ -60,3 +62,13 @@ data NinjaGraphCLIOptions = NinjaGraphCLIOptions
, ninjaScanId :: Text
, ninjaBuildName :: Text
}

-- | Feature flags are set in the FOSSA API.
-- Not all feature flags are relevant to Spectrometer, but those that are can be found here.
data FeatureFlag
= -- | Enable VSI and Monorepo functionality
FeatureFlagVSIMonorepo

-- | Translate the flag to its name in the FOSSA API.
coreFlagName :: FeatureFlag -> Text
coreFlagName FeatureFlagVSIMonorepo = "vendoredPackageScanning"

0 comments on commit 0a99c73

Please sign in to comment.