Skip to content

Skip POT file update when only date-related lines changed#397

Merged
benbalter merged 4 commits intomasterfrom
copilot/dont-update-pot-file-date-change
Apr 9, 2026
Merged

Skip POT file update when only date-related lines changed#397
benbalter merged 4 commits intomasterfrom
copilot/dont-update-pot-file-date-change

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

The pot.yml workflow regenerates the POT file on every push to master and opens a PR via create-pull-request. When no translatable strings changed, the only diff is the POT-Creation-Date timestamp (see #395), producing noisy no-op PRs.

  • script/build-pot now saves the existing POT file before regeneration, then compares old vs new with POT-Creation-Date and # Copyright (C) lines stripped. If identical, the old file is restored so create-pull-request sees no diff.

Copilot AI linked an issue Apr 9, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix POT file update for date changes Skip POT file update when only date-related lines changed Apr 9, 2026
Copilot AI requested a review from benbalter April 9, 2026 20:35
@benbalter benbalter marked this pull request as ready for review April 9, 2026 20:43
Copilot AI review requested due to automatic review settings April 9, 2026 20:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the POT-generation helper script to avoid creating noisy no-op PRs when the only differences in the regenerated POT are timestamp/copyright header lines.

Changes:

  • Introduce a POT_FILE variable and back up the existing POT before regeneration.
  • After running wp-pot, compare old vs new POT content while ignoring POT-Creation-Date and # Copyright (C) lines.
  • If only those ignored lines changed, restore the previous POT file to avoid a diff.
Show a summary per file
File Description
script/build-pot Adds a backup/compare/restore flow to prevent no-op POT update diffs caused only by date-related header changes.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread script/build-pot Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@benbalter benbalter merged commit 48e3d69 into master Apr 9, 2026
9 checks passed
@benbalter benbalter deleted the copilot/dont-update-pot-file-date-change branch April 9, 2026 20:54
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.

Don't update POT file if it's only a date change

3 participants