From a107b94a7f3ccd774d7bef01ddc96a68be436225 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 1 Nov 2026 16:39:18 -0500 Subject: [PATCH 1/3] Dependabot: the package's dependencies are in pyproject.toml at the root now Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01YE1ueiJvYfUin97tTc1j1a --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5165125..e6d4058 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,7 +7,7 @@ updates: schedule: interval: weekly - package-ecosystem: pip - directory: /preview + directory: / target-branch: dev schedule: interval: weekly From cc9058ad1312e0d8e9f274ed8f256f16308e4361 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 2 Nov 2026 11:28:43 -0500 Subject: [PATCH 2/3] CLAUDE.md: repository settings and resetting dev after a release Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01YE1ueiJvYfUin97tTc1j1a --- CLAUDE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CLAUDE.md b/CLAUDE.md index 50bf1ac..4f26376 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -3,6 +3,7 @@ Shared tooling for the owner's Zepp OS projects (raetha/zepp-kestrel, raetha/zepp-watch-faces, more later): GitHub Actions and scripts for building, test builds, Zepp previews, releases and the emulator. Read `README.md` and `docs/plan.md` first. - **Branches:** work on `dev`; never push to `main`. A release is one squash-merged pull request from `dev` into `main`, opened when the owner asks: it sets `pyproject.toml`'s and `zepp_devkit/__init__.py`'s version and dates the changelog section. After the merge, CI tags `main` as `vX.Y.Z` and publishes the GitHub release (`release.yml`). Projects pin a commit with the version in a comment, and Dependabot proposes updates there. +- **Repository settings:** a ruleset protects `main` (pull requests, squash only); merged branches are deleted automatically; a classic rule keeps `dev` from being deleted and allows force pushes (to reset it onto `main` after a release squash merge: `git checkout dev && git reset --hard origin/main && git push --force-with-lease`). - Record each change under `## [Unreleased]` in `CHANGELOG.md`, written for the projects using it. Never bump a version or date the changelog without being asked. - **Behaviour changes reach every project.** Keep inputs backwards compatible within a major version; a breaking change is a new major version, with the migration in the changelog. Test with the fake Zeus (`test/`), and then in a project's CI before releasing. - **Security:** the Zepp login is in each project's secrets, never here. Never print it, the Zepp app's log, or `zeus bridge` output. Actions pinned to commits; `contents: read` unless a job needs more. From 1d5a2798f24d676075723305efb734e39ae3aa09 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 2 Nov 2026 11:53:47 -0500 Subject: [PATCH 3/3] Release workflow: reset dev to main after a release (sync-dev), as the other repos do Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01YE1ueiJvYfUin97tTc1j1a --- .github/workflows/release.yml | 27 ++++++++++++++++++++++++++- CLAUDE.md | 4 ++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4567021..4a54590 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,8 @@ name: Release # On main (one squash-merged pull request per release): when pyproject.toml's version has no # `v` tag yet, tag it and publish a GitHub release with that version's changelog -# section. Projects then pin the tag (zepp-devkit @ git+...@vX.Y.Z), and Dependabot sees it. +# section. Projects then pin the tag (zepp-devkit @ git+...@vX.Y.Z). Then reset dev to main +# (sync-dev), as zepp-kestrel and zepp-watch-faces do. on: push: @@ -37,3 +38,27 @@ jobs: fi zepp-devkit notes CHANGELOG.md "$version" > notes.md gh release create "v$version" --target "$GITHUB_SHA" --title "zepp-devkit $version" --notes-file notes.md + + # After a release pull request is merged, dev holds the same files as main but different + # commits; reset it to main so the next cycle starts clean. Skipped if dev has new work. + # (dev's classic protection rule allows force pushes for this.) + sync-dev: + needs: [release] + runs-on: ubuntu-24.04 + permissions: + contents: write + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + + - name: Reset dev to main if they match + run: | + set -e + git rev-parse -q --verify origin/dev >/dev/null || { echo "no dev branch"; exit 0; } + if git diff --quiet origin/main origin/dev; then + git push --force origin origin/main:refs/heads/dev + echo "dev reset to main" + else + echo "dev has changes that aren't on main: left as it is" + fi diff --git a/CLAUDE.md b/CLAUDE.md index 4f26376..4037c71 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,8 +2,8 @@ Shared tooling for the owner's Zepp OS projects (raetha/zepp-kestrel, raetha/zepp-watch-faces, more later): GitHub Actions and scripts for building, test builds, Zepp previews, releases and the emulator. Read `README.md` and `docs/plan.md` first. -- **Branches:** work on `dev`; never push to `main`. A release is one squash-merged pull request from `dev` into `main`, opened when the owner asks: it sets `pyproject.toml`'s and `zepp_devkit/__init__.py`'s version and dates the changelog section. After the merge, CI tags `main` as `vX.Y.Z` and publishes the GitHub release (`release.yml`). Projects pin a commit with the version in a comment, and Dependabot proposes updates there. -- **Repository settings:** a ruleset protects `main` (pull requests, squash only); merged branches are deleted automatically; a classic rule keeps `dev` from being deleted and allows force pushes (to reset it onto `main` after a release squash merge: `git checkout dev && git reset --hard origin/main && git push --force-with-lease`). +- **Branches:** work on `dev`; never push to `main`. A release is one squash-merged pull request from `dev` into `main`, opened when the owner asks: it sets `pyproject.toml`'s and `zepp_devkit/__init__.py`'s version and dates the changelog section. After the merge, CI tags `main` as `vX.Y.Z`, publishes the GitHub release and resets `dev` to `main` (`release.yml`). Projects pin a commit with the version in a comment, and Dependabot proposes updates there. +- **Repository settings:** a ruleset protects `main` (pull requests, squash only); merged branches are deleted automatically; a classic rule keeps `dev` from being deleted and allows force pushes: after a release squash merge, CI resets `dev` onto `main` (`sync-dev` in `release.yml`) when nothing new landed on `dev` meanwhile; otherwise reset it by hand once that work is released (`git checkout dev && git reset --hard origin/main && git push --force-with-lease`). - Record each change under `## [Unreleased]` in `CHANGELOG.md`, written for the projects using it. Never bump a version or date the changelog without being asked. - **Behaviour changes reach every project.** Keep inputs backwards compatible within a major version; a breaking change is a new major version, with the migration in the changelog. Test with the fake Zeus (`test/`), and then in a project's CI before releasing. - **Security:** the Zepp login is in each project's secrets, never here. Never print it, the Zepp app's log, or `zeus bridge` output. Actions pinned to commits; `contents: read` unless a job needs more.