From 9cde7ad2ff3fb4c63329fbb28fd04473b267b8fc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 12:09:21 +0000 Subject: [PATCH 1/2] Initial plan From 501edac4533ba84e6f419510ea2a55bda32bf0f9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 12:11:57 +0000 Subject: [PATCH 2/2] Fix sync-tag-definitions workflow: only commit tag_types.py and close old PRs Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com> --- .github/workflows/sync-tag-definitions.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync-tag-definitions.yml b/.github/workflows/sync-tag-definitions.yml index c8ff2d2..317ea06 100644 --- a/.github/workflows/sync-tag-definitions.yml +++ b/.github/workflows/sync-tag-definitions.yml @@ -33,7 +33,21 @@ jobs: - name: Generate updated tag_types.py id: generate - run: python3 scripts/generate_tag_types.py new_tag_types.json + run: | + python3 scripts/generate_tag_types.py new_tag_types.json + rm -f new_tag_types.json + + - name: Close existing automated PR + if: steps.generate.outputs.changed == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Find and close any existing open PRs on the automated branch + existing_prs=$(gh pr list --repo "${{ github.repository }}" --head "automated/sync-tag-definitions" --state open --json number --jq '.[].number') + for pr_number in $existing_prs; do + echo "Closing existing PR #$pr_number" + gh pr close "$pr_number" --repo "${{ github.repository }}" --comment "Superseded by a newer automated update." + done - name: Create Pull Request if: steps.generate.outputs.changed == 'true' @@ -63,6 +77,8 @@ jobs: *This PR was automatically created by the sync-tag-definitions workflow* branch: 'automated/sync-tag-definitions' delete-branch: true + add-paths: | + custom_components/opendisplay/tag_types.py labels: | automated dependencies