Skip to content

Releases: MikhailEpatko/hoc-badge-action

Release-3.2.0

24 Mar 18:28
Compare
Choose a tag to compare

Added background color options

Release-3.1.0

24 Mar 17:58
Compare
Choose a tag to compare

Added options for output formatting

Release-3.0.6

10 Mar 14:51
eb9a2b3
Compare
Choose a tag to compare

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

10 Mar 12:22
Compare
Choose a tag to compare

Fixed number of hits it counts. Now action counts hits of all commits history.

Release-3.0.4

06 Mar 20:53
Compare
Choose a tag to compare

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

04 Mar 17:57
ddc393f
Compare
Choose a tag to compare

Added output directory and output filename configuration.
Changed default filename to 'hoc-badge.svg'.

Release-2.0.0

03 Mar 18:50
Compare
Choose a tag to compare

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.

hoc project page

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

03 Mar 17:16
Compare
Choose a tag to compare

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.

hoc project page

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.