Releases: MikhailEpatko/hoc-badge-action
Release-3.2.0
Added background color options
Release-3.1.0
Added options for output formatting
Release-3.0.6
For exclude option we can use multiline strings if we want to pass multiple values.
In this case it's an important detail that we used '|' or '|-' in the YAML.
There is no default value for exclude option.
exclude: |
dir1/**
dir2/**/*
dir3/file.txt
Release-3.0.5
Fixed number of hits it counts. Now action counts hits of all commits history.
Release-3.0.4
Changed repository name.
Fixed output directory creation. Now action can make parent directories if needed. For example: output_dir: path/to/output/dir
Added Shellcheck job to the project workflow.
Added markdown-lint job to the project workflow.
Release-3.0.1
Added output directory and output filename configuration.
Changed default filename to 'hoc-badge.svg'.
Release-2.0.0
GitHub action to generate Hits-of-Code badge with hoc calculated metric.
hoc - is a command line tool to calculate Hits-of-Code metric in a source code repository (at the moment it supports Git 2+ and Subversion 1.7+).
You can read more about Hits-of-Code metric in this blog post: Hits-of-Code Instead of SLoC.
To install action copy the workflow code into a .github/workflows/main.yml file in your repository
on: [push]
jobs:
lines_counter_job:
runs-on: ubuntu-latest
name: A job to count hits of code
steps:
- uses: actions/checkout@v4
- id: badge-generator
uses: ./ # write the action name instead
with:
before: '2024-03-03' # default value - now day
dir: '.' # default value - include all files
exclude: 'vendor/**' # no default value
since: '2000-01-01' # default value - '2000-01-01'
Changes:
The badge will be generated in ./output/hits.svg file. Use whatever tool you prefer to upload it somewhere.
Release-1.0.1
GitHub action to generate Hits-of-Code badge with hoc calculated metric.
hoc - is a command line tool to calculate Hits-of-Code metric in a source code repository (at the moment it supports Git 2+ and Subversion 1.7+).
You can read more about Hits-of-Code metric in this blog post: Hits-of-Code Instead of SLoC.
To install action copy the workflow code into a .github/workflows/main.yml file in your repository
on: [push]
jobs:
lines_counter_job:
runs-on: ubuntu-latest
name: A job to count hits of code
steps:
- uses: actions/checkout@v4
- id: badge-generator
uses: ./ # write the action name instead
with:
before: '2024-03-03' # default value - now day
dir: '.' # default value - include all files
exclude: 'vendor/**' # no default value
since: '2000-01-01' # default value - '2000-01-01'
The badge will be generated in image-data branch of your repository. For this you need to configure Setting the permissions of the GITHUB_TOKEN for your repository.