FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

refactor: replace push-based sync with pull-based reusable workflow by NWarila · Pull Request #4 · NWarila/python-template · GitHub

/ python-template Public template

refactor: replace push-based sync with pull-based reusable workflow - #4

Merged
NWarila merged 1 commit into
mainfrom
refactor/pull-based-sync
Apr 8, 2026
Merged

refactor: replace push-based sync with pull-based reusable workflow#4
NWarila merged 1 commit into
mainfrom
refactor/pull-based-sync

Conversation

NWarila commented Apr 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove sync-downstream.yml and its PAT requirement — sync is now pull-based
  • Downstream repos call self-update.yml as a reusable workflow via uses: nwarila/python-template/.github/workflows/self-update.yml@v1
  • Extract inline sync logic into scripts/sync.py (standalone, stdlib-only, testable)
  • Add workflow_call trigger so the same workflow serves both dogfood and downstream
  • Remove downstream_repos from sync-manifest.json (template doesn't push)
  • Document manifest-driven sync rationale vs submodules/packages

Design

Each repo owns its own updates. The template publishes releases, consumers pull when ready. No cross-repo credentials, no push permissions, no coupling.

Downstream repos only need a thin wrapper:

name: Template Sync
on:
  schedule:
    - cron: "0 6 * * 1"
  workflow_dispatch:
permissions:
  contents: write
  pull-requests: write
jobs:
  sync:
    uses: nwarila/python-template/.github/workflows/self-update.yml@v1

Test plan

  • scripts/sync.py runs against this repo as template source (15 files synced)
  • Marker-preserve logic tested with template and repo-specific regions
  • YAML syntax validated on self-update.yml
  • Manifest structure validated (no downstream_repos, all mappings have src/dest)
  • All three workflow triggers present: schedule, workflow_dispatch, workflow_call

Remove sync-downstream.yml and its PAT requirement. Sync is now
pull-based: each downstream repo calls self-update.yml as a reusable
workflow via uses: nwarila/python-template/.github/workflows/self-update.yml@v1.

- Extract inline sync logic into scripts/sync.py (standalone, testable)
- Add workflow_call trigger to self-update.yml for downstream callers
- Remove downstream_repos from sync-manifest.json (template doesn't push)
- Add sync.py to manifest so downstream repos receive it
- Document manifest-driven sync rationale vs submodules/packages
- Update PLAN.md and README.md to reflect pull-based architecture
NWarila merged commit b001ad1 into main Apr 8, 2026
13 checks passed
NWarila deleted the refactor/pull-based-sync branch April 8, 2026 16:20
NWarila added a commit that referenced this pull request Jun 2, 2026
## Summary

- **SECURITY.md**: Adds supported-version policy (latest release / `v1`
tag), private vulnerability reporting via the GitHub Security tab,
response-timeline table, and in/out-of-scope classification (scripts,
workflows, reference configs; excludes upstream third-party tools).
- **docs/decision-records/0001**: Captures the already-shipped decision
that QA scripts are standalone and stdlib-only — no shared helper
module, no third-party imports. Converts reasoning from PLAN.md Resolved
Decision 14.
- **docs/decision-records/0002**: Captures the already-shipped decision
to use pull-based, manifest-driven template sync instead of push-based
cross-repo credentials or git submodules. Converts reasoning from
PLAN.md Resolved Decision 22 and the PR #4 refactor.
- **docs/diagrams/qa-template-sync-flow.mmd**: Mermaid flowchart of the
QA and template-sync flow — from `scripts/` through `auto-release.yml` →
release tag → `self-update.yml` → downstream sync PR → `python-qa.yml`
reusable workflow.
- **README.md**: Adds a Security Policy badge alongside the existing CI,
Coverage, Python, Platform, and License badges.
- **.gitignore**: Adds allowlist entries for `SECURITY.md` and the new
`docs/` directory tree (deny-all model requires explicit allowlisting of
every new path).

## Test plan

- [ ] markdownlint passes on all new and modified `.md` files (verified
locally: 0 errors)
- [ ] All new files appear as tracked in `git status --short` (verified:
no files ignored)
- [ ] No AI bylines, Co-authored-by trailers, or "generated by" text in
files or commit message (verified via grep)
- [ ] CI (`template-ci.yml`) passes on the PR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL