Refresh copyright notices - #844
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c4c1bef1d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
|
|
||
| def last_updated_year(path: str) -> str: | ||
| return git("log", "-1", "--format=%ad", "--date=format:%Y", "--", path) |
There was a problem hiding this comment.
Exclude header-refresh commits from the update lookup
Once the --write output is committed, this lookup treats that copyright-only commit as each file's latest revision. Running the script on the reviewed tree already exits 1 and proposes changing 16 deliberately preserved 2020/2022 end years to 2026, so the generator is not idempotent and its next invocation destroys the per-file years it just computed. Determine the last substantive revision or otherwise ignore header-refresh commits.
Useful? React with 👍 / 👎.
| KONRAD_HEADER = re.compile( | ||
| r"(?P<prefix>Copyright © (?P<start>20\d{2})[–-])20\d{2} Konrad Kollnig" | ||
| r"(?: \(University of Oxford\))?" |
There was a problem hiding this comment.
Recognize single-year copyright notices
Because this pattern requires a start year, separator, and end year, the default repository scan ignores single-year notices. In this tree, app/src/main/java/net/kollnig/missioncontrol/dns/DnsProxyServer.java therefore remains Copyright © 2024 Konrad Kollnig (University of Oxford), leaving the affiliation that this refresh is intended to remove. Support the single-year form when matching and preserve it or expand it using the history year.
Useful? React with 👍 / 👎.
717ddfe to
d9896a0
Compare
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
d9896a0 to
f92f149
Compare
Summary
Validation
uv run --script scripts/refresh_copyright_headers.py./gradlew :app:compileGithubDebugJavaWithJavac -q