header-comments

GitHub Action to add header comments to all your files

Usage no npm install needed!

<script type="module">
  import headerComments from 'https://cdn.skypack.dev/header-comments';
</script>

README

📑 Header Comments Action

GitHub Action to add header comments to all your files

Build CI Test CI Release CI Node CI

⭐ How it works

First, create a file .github/FILE_HEADER where you can write, for example, license text to put in the file header. This Action will automatically add that at the top of each file in your repository.

This Action does not commit or push files, you can use another Action like stefanzweifel/git-auto-commit-action to commit the changes, or peter-evans/create-pull-request to create a pull request with the changes:

name: Header Comments CI
on:
  push:
    branches:
      - main
jobs:
  test:
    name: Add comments
    runs-on: ubuntu-18.04
    steps:
      - name: Checkout
        uses: actions/checkout@v2.3.4
      - name: Add comments to src/
        uses: koj-co/header-comments
        with:
          directory: src
      - name: Create PR with changes
        uses: peter-evans/create-pull-request@v3

Options

directory (optional)

Only files in this directory, for example src, will get headers.

📄 License

  • Code: MIT © Koj
  • "GitHub" is a trademark of GitHub, Inc.

Koj

An open source project by Koj.
Furnish your home in style, for as low as CHF175/month →