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

Add copyright header year check for new files #6911

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

kschiffer
Copy link
Contributor

Summary

This PR adds a new mage target and amends the code-quality workflow file to make sure that all newly introduced files use the copyright header with the correct year.

Changes

  • Add mage target mage headers:checkNewFiles
  • Improve error logging of header targets so they can appear in the PR diff directly
  • Add target to the code quality workflow so that it runs for each new PR

Notes for Reviewers

I'm getting tired of annotating this every other PR. We could even add a target that automatically fixes this, but that would result in an additional commit.

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • The steps/process to test this feature are clearly explained including testing for regressions.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

@kschiffer kschiffer added the tooling Development tooling label Feb 2, 2024
@kschiffer kschiffer self-assigned this Feb 2, 2024
@kschiffer kschiffer requested a review from a team as a code owner February 2, 2024 04:29
@kschiffer kschiffer force-pushed the feature/copyright-header-year-check branch 4 times, most recently from 3258c22 to 1d01b3c Compare February 2, 2024 04:53
@kschiffer kschiffer requested a review from a team as a code owner February 2, 2024 04:53
@github-actions github-actions bot added the ui/web This is related to a web interface label Feb 2, 2024
@kschiffer kschiffer force-pushed the feature/copyright-header-year-check branch from 1d01b3c to 069f381 Compare February 2, 2024 04:59
tools/mage/headers.go Outdated Show resolved Hide resolved
@kschiffer kschiffer force-pushed the feature/copyright-header-year-check branch from 069f381 to e4fa4aa Compare February 5, 2024 03:36
@kschiffer kschiffer force-pushed the feature/copyright-header-year-check branch from e4fa4aa to 791a41c Compare February 5, 2024 03:37
@kschiffer kschiffer merged commit 78f6ffa into v3.29 Feb 6, 2024
16 checks passed
@kschiffer kschiffer deleted the feature/copyright-header-year-check branch February 6, 2024 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Development tooling ui/web This is related to a web interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants