Skip to content

Configure pre-commit for license headers and automatic pyink reformat#3479

Merged
copybara-service[bot] merged 1 commit intomainfrom
igorts/precommit
Mar 24, 2026
Merged

Configure pre-commit for license headers and automatic pyink reformat#3479
copybara-service[bot] merged 1 commit intomainfrom
igorts/precommit

Conversation

@igorts-git
Copy link
Copy Markdown
Collaborator

@igorts-git igorts-git commented Mar 20, 2026

Description

Add a third-party pre-commit hook to automatically add license headers if it is not present already.
Also allow pyink to automatically format files rather than just check them.
In both cases the newly modified files need to be git add'ed again to be commited.

Reminder: To benefit from this one needs to run pre-commit install once in their git repo.

Tests

Manually modified existing files to remove the license and to break code formatting.

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@copybara-service copybara-service Bot merged commit ff34f1b into main Mar 24, 2026
43 checks passed
@copybara-service copybara-service Bot deleted the igorts/precommit branch March 24, 2026 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants