Skip to content

Fix sync-tag-definitions workflow: scope commits to tag_types.py only, close superseded PRs#7

Merged
Misiu merged 2 commits intomainfrom
copilot/fix-workflow-tag-checks
Feb 11, 2026
Merged

Fix sync-tag-definitions workflow: scope commits to tag_types.py only, close superseded PRs#7
Misiu merged 2 commits intomainfrom
copilot/fix-workflow-tag-checks

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 11, 2026

The sync-tag-definitions workflow was committing the intermediate new_tag_types.json file alongside tag_types.py in automated PRs (see PR #6). It also had no mechanism to close stale PRs when a newer sync runs.

  • Scope committed files: Added add-paths: custom_components/opendisplay/tag_types.py to peter-evans/create-pull-request so only the target file is included in the PR
  • Clean up intermediate artifacts: rm -f new_tag_types.json after generation as a belt-and-suspenders measure
  • Close superseded PRs: New step before PR creation uses gh pr list/close on the automated/sync-tag-definitions branch to close any existing open PR with a comment, matching Dependabot-style behavior

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

… old PRs

Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>
@Misiu Misiu marked this pull request as ready for review February 11, 2026 12:12
Copilot AI changed the title [WIP] Fix workflow to create PR only for tag_types.py changes Fix sync-tag-definitions workflow: scope commits to tag_types.py only, close superseded PRs Feb 11, 2026
Copilot AI requested a review from Misiu February 11, 2026 12:12
@Misiu Misiu merged commit b805a34 into main Feb 11, 2026
3 checks passed
Misiu added a commit that referenced this pull request Feb 11, 2026
* Initial plan

* Fix tag type definition URL and improve error handling

Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>

* Update fallback tag type definitions with complete data from OpenEPaperLink

Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>

* Remove unnecessary bpp and rotatebuffer fields from fallback definitions

Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>

* Add workflow to sync tag type definitions weekly from OpenEPaperLink

Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>

* test

Updated dimensions for BWRY example display.

* Initial plan

* Extract inline Python from workflow into scripts with tests and fix bugs

- Move inline Python from sync-tag-definitions.yml into scripts/fetch_tag_types.py
  and scripts/generate_tag_types.py for easier debugging and change tracking
- Fix re.sub() crash on Unicode escape sequences (e.g. \u2010) by using string
  slicing instead of regex replacement
- Fix string vs integer key type mismatch when comparing JSON data
- Fix lexicographic sorting of type IDs
- Use ensure_ascii=False to preserve Unicode characters in output
- Add 28 tests covering all script functions

Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>

* Address code review: fix list comprehension safety and tighten unicode assertion

Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>

* Fix test_overlapping_elements: regenerate reference image as JPEG

The reference image overlapping_elements.png was saved as a real PNG
while the image generator produces JPEG output. All other reference
images are JPEG data (with .png extension). This mismatch caused the
pixel-exact comparison to fail. Regenerated the reference from the
current image generator output.

Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>

* Rename JPEG test reference images from .png to .jpg

All 52 test reference images contain JPEG data (confirmed by FFD8FF
magic bytes) but had incorrect .png extensions. The image generator
(core.py:411) explicitly outputs JPEG format.

- Rename all 52 reference images from .png to .jpg
- Update all 15 test files to reference .jpg instead of .png
- Verified all 82 tests pass

Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>

* Initial plan

* Fix sync-tag-definitions workflow: only commit tag_types.py and close old PRs

Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>

* Initial plan

* Revert non-test changes to match upstream state

Reverted config_flow.py, tag_types.py to upstream state, and removed
sync-tag-definitions workflow, scripts/, and tests/scripts/ so this
branch contains only test-related changes (png→jpg rename and
overlapping_elements fix).

This isolates the test fixes for a clean PR to the upstream repo.

Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>
@Misiu Misiu deleted the copilot/fix-workflow-tag-checks branch February 12, 2026 07:31
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.

2 participants