#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

# This script is from https://github.com/shadowmoose/GHA-LoC-Badge/blob/master/action.yml

name: 'lines of code Badge'
description: 'Generate a badge to display total Lines of Code'
inputs:
  directory:
    description: 'The directory to scan.'
    required: false
    default: './'
  badge:
    description: 'The output path to save the badge svg - including extension!'
    required: false
    default: './badge.svg'
  patterns:
    description: 'The file patterns to search for, separated by pipes ("|").'
    required: false
    default: "**"
  ignore:
    description: 'The file patterns to ignore, even if they matched "patterns", separated by pipes ("|").'
    required: false
    default: "node_modules"
  badge_label:
    description: "The label to use for the badge."
    required: false
    default: "lines of code"
  badge_color:
    description: "The color to use for the badge."
    required: false
    default: "blue"
  badge_style:
    description: "The body style to use for the badge. ('flat' or 'classic')"
    required: false
    default: "classic"
  badge_scale:
    description: "The scale to resize this badge"
    required: false
    default: "1"
  badge_labelcolor:
    description: "The color to use for this badge label."
    required: false
    default: "555"
  debug:
    description: 'Enable debug logging'
    required: false
    default: 'false'

runs:
  using: 'node12'
  main: './src/index.js'

branding:
  icon: 'award'  
  color: 'green'
