From b35c134b239f91e72f60b01bfa80be6b3645ef0e Mon Sep 17 00:00:00 2001 From: Andreas Salhus Bakseter <141913422+baksetercx@users.noreply.github.com> Date: Thu, 25 Apr 2024 13:21:38 +0200 Subject: [PATCH] Remove permissions from step in usage, incorrect syntax --- .github/gh-actions-docs/app/Main.hs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/gh-actions-docs/app/Main.hs b/.github/gh-actions-docs/app/Main.hs index 86e4973..189e005 100644 --- a/.github/gh-actions-docs/app/Main.hs +++ b/.github/gh-actions-docs/app/Main.hs @@ -181,13 +181,12 @@ prettyPrintPermissions _ = "" prettyPrintUsage :: String -> Maybe Inputs -> ActionMetadata -> String -prettyPrintUsage name' inputs' (ActionMetadata path' (Just owner') (Just project') (Just version') permissions') = +prettyPrintUsage name' inputs' (ActionMetadata path' (Just owner') (Just project') (Just version') _) = "### Usage\n"++ "```yaml\n" ++ "- name: " ++ name' ++ "\n" ++ " uses: " ++ owner' ++ "/" ++ project' ++ actionPathWithoutFile ++ "@" ++ version' ++ "\n" - ++ prettyPrintUsagePermissions permissions' ++ prettyPrintUsageWith inputs' ++ "```\n" where @@ -196,18 +195,8 @@ prettyPrintUsage name' inputs' (ActionMetadata path' (Just owner') (Just project prependSlashIfNotEmpty x = "/" ++ x prettyPrintUsage _ _ _ = "" -prettyPrintUsagePermissions :: Maybe Permissions -> String -prettyPrintUsagePermissions (Just permissions'') = - " permissions:\n" - ++ concatMap - ( \(name', access) -> - " " ++ name' ++ ": " ++ show access ++ "\n" - ) - (toList permissions'') -prettyPrintUsagePermissions Nothing = "" - prettyPrintUsageWith :: Maybe Inputs -> String -prettyPrintUsageWith (Just inputs'') = " with:\n" ++ concatMap (uncurry prettyPrintUsageInputs) (toList inputs'') +prettyPrintUsageWith (Just inputs') = " with:\n" ++ concatMap (uncurry prettyPrintUsageInputs) (toList inputs') prettyPrintUsageWith Nothing = "" prettyPrintUsageInputs :: String -> ActionInput -> String