From fb0d895178e51be680c4e8b73a265e03debdc308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Avil=C3=A9s?= Date: Fri, 22 Sep 2023 11:07:01 +0200 Subject: [PATCH] Check headers with unbeheader --- .github/workflows/ci.yml | 4 ++-- headers.yml => .header.yaml | 7 ++++--- .../indico_citadel/migrations/{.no-headers => .no-header} | 0 .../indico_livesync/migrations/{.no-headers => .no-header} | 0 payment_sixpay/.header.yaml | 2 ++ payment_sixpay/headers.yml | 2 -- .../indico_piwik/static/js/lib/{.no-headers => .no-header} | 0 .../themes/{.no-headers => .no-header} | 0 vc_zoom/.header.yaml | 2 ++ vc_zoom/headers.yml | 2 -- 10 files changed, 10 insertions(+), 9 deletions(-) rename headers.yml => .header.yaml (76%) rename citadel/indico_citadel/migrations/{.no-headers => .no-header} (100%) rename livesync/indico_livesync/migrations/{.no-headers => .no-header} (100%) create mode 100644 payment_sixpay/.header.yaml delete mode 100644 payment_sixpay/headers.yml rename piwik/indico_piwik/static/js/lib/{.no-headers => .no-header} (100%) rename themes_legacy/indico_themes_legacy/themes/{.no-headers => .no-header} (100%) create mode 100644 vc_zoom/.header.yaml delete mode 100644 vc_zoom/headers.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34aca2e08..e604f3367 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -161,9 +161,9 @@ jobs: - name: Check headers if: success() || failure() run: | - wget "https://raw.githubusercontent.com/indico/indico/${INDICO_BRANCH}/bin/maintenance/update_header.py" -O /tmp/update_header.py + pipx install unbeheader echo '::add-matcher::.github/matchers/headers-problem-matcher.json' - python /tmp/update_header.py --ci + unbehead --check echo '::remove-matcher owner=headers::' - name: Run flake8 diff --git a/headers.yml b/.header.yaml similarity index 76% rename from headers.yml rename to .header.yaml index f889faf50..bb2e38074 100644 --- a/headers.yml +++ b/.header.yaml @@ -1,9 +1,10 @@ root: true -name: CERN +owner: CERN start_year: 2002 -header: |- +substring: This file is part of +template: |- {comment_start} This file is part of the Indico plugins. - {comment_middle} Copyright (C) {dates} {name} + {comment_middle} Copyright (C) {dates} {owner} {comment_middle} {comment_middle} The Indico plugins are free software; you can redistribute {comment_middle} them and/or modify them under the terms of the MIT License; diff --git a/citadel/indico_citadel/migrations/.no-headers b/citadel/indico_citadel/migrations/.no-header similarity index 100% rename from citadel/indico_citadel/migrations/.no-headers rename to citadel/indico_citadel/migrations/.no-header diff --git a/livesync/indico_livesync/migrations/.no-headers b/livesync/indico_livesync/migrations/.no-header similarity index 100% rename from livesync/indico_livesync/migrations/.no-headers rename to livesync/indico_livesync/migrations/.no-header diff --git a/payment_sixpay/.header.yaml b/payment_sixpay/.header.yaml new file mode 100644 index 000000000..9bc58f669 --- /dev/null +++ b/payment_sixpay/.header.yaml @@ -0,0 +1,2 @@ +owner: Max Fischer, Martin Claus, CERN +start_year: 2017 diff --git a/payment_sixpay/headers.yml b/payment_sixpay/headers.yml deleted file mode 100644 index 55bdd6829..000000000 --- a/payment_sixpay/headers.yml +++ /dev/null @@ -1,2 +0,0 @@ -name: Max Fischer, Martin Claus, CERN -start_year: 2017 diff --git a/piwik/indico_piwik/static/js/lib/.no-headers b/piwik/indico_piwik/static/js/lib/.no-header similarity index 100% rename from piwik/indico_piwik/static/js/lib/.no-headers rename to piwik/indico_piwik/static/js/lib/.no-header diff --git a/themes_legacy/indico_themes_legacy/themes/.no-headers b/themes_legacy/indico_themes_legacy/themes/.no-header similarity index 100% rename from themes_legacy/indico_themes_legacy/themes/.no-headers rename to themes_legacy/indico_themes_legacy/themes/.no-header diff --git a/vc_zoom/.header.yaml b/vc_zoom/.header.yaml new file mode 100644 index 000000000..9c9750282 --- /dev/null +++ b/vc_zoom/.header.yaml @@ -0,0 +1,2 @@ +owner: CERN and ENEA +start_year: 2020 diff --git a/vc_zoom/headers.yml b/vc_zoom/headers.yml deleted file mode 100644 index 5d9d81e7a..000000000 --- a/vc_zoom/headers.yml +++ /dev/null @@ -1,2 +0,0 @@ -name: CERN and ENEA -start_year: 2020