Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic Generation of License Headers #958

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

YuanYuYuan
Copy link
Contributor

@YuanYuYuan YuanYuYuan commented Apr 22, 2024

At first, I've tried with skywalking-eyes developed by Apache. But it turns out to be too slow to generate the header. Then hawkeye from the greptime was tested and ran fluently. It's quite slim and extensible to use. And the check is fast enough to be integrated into CI.

@YuanYuYuan YuanYuYuan closed this Apr 22, 2024
@YuanYuYuan YuanYuYuan reopened this Apr 22, 2024
@YuanYuYuan YuanYuYuan marked this pull request as draft April 22, 2024 08:26
@YuanYuYuan YuanYuYuan marked this pull request as ready for review April 22, 2024 08:45
@YuanYuYuan YuanYuYuan force-pushed the feat/license-header branch from 868d86a to 0d8d1ec Compare April 22, 2024 09:09
@YuanYuYuan
Copy link
Contributor Author

YuanYuYuan commented Apr 22, 2024

An example workflow to automatize the license header fix.

on: push
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          # To work with PR.
          # See https://github.com/EndBug/add-and-commit?tab=readme-ov-file#working-with-prs
          repository: ${{ github.event.pull_request.head.repo.full_name }}
          ref: ${{ github.event.pull_request.head.ref }}

      - name: Check License Header
        uses: korandoru/hawkeye@v5
        with:
          mode: format
        # Workaround: hawkeye uses the inappropriate logging level.
        continue-on-error: true

      - uses: EndBug/add-and-commit@v9
        with:
          committer_name: eclipse-zenoh-bot
          committer_email: [email protected]

A manual check is still needed as the feature of publication year is still missing. See korandoru/hawkeye#114

@Mallets
Copy link
Member

Mallets commented Apr 22, 2024

I think the workflow should be added to eclipse-zenoh/ci instead of eclipse-zenoh/zenoh. @fuzzypixelz ?

@Mallets
Copy link
Member

Mallets commented May 28, 2024

@diogomatsubara could please have a look at this PR?

@diogomatsubara
Copy link
Contributor

diogomatsubara commented May 29, 2024

@Mallets sure thing. I'll add the workflow to the CI repository and then enable them for the zenoh-* repos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants