Skip to content

Sync from ProjectTemplate: enriched docker-readme, merge gate, LF pins#764

Open
ptr727 wants to merge 13 commits into
developfrom
chore/sync-template
Open

Sync from ProjectTemplate: enriched docker-readme, merge gate, LF pins#764
ptr727 wants to merge 13 commits into
developfrom
chore/sync-template

Conversation

@ptr727

@ptr727 ptr727 commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Converges develop to the current ProjectTemplate state (branch template-convergence): carries the template's shared artifacts verbatim and brings this repo's workflow/task surface into line with the template conventions, while preserving the genuine, intentional adaptations listed below.

What this PR does

  • Carried artifacts (content-identical to the template): CODESTYLE.md (whole-file), AGENTS.md PR Review Etiquette + Merge Gate, the .editorconfig/.gitattributes per-extension EOL blocks (incl. the Dockerfile/*.Dockerfile LF pins), and .markdownlint-cli2.jsonc.
  • publish-docker-readme-task.yml - replaced with the enriched template task: a get-repos job (static repositories or manifest + manifest-jq), an optional transform-run render after an optional transform-artifact download, and a readme-filepath input. Uses DOCKER_HUB_ACCESS_TOKEN.
  • publish-release.yml - rewires the m4 Docker Hub README generation onto the enriched task: transform-artifact: versions-main (file latest.ver) downloaded to $RUNNER_TEMP/transform, then transform-run: m4 --include=$RUNNER_TEMP/transform ./Docker/README.m4 > ./Docker/README.md. The job is caller-gated to main; build-toolversions-task.yml stays - it produces the artifact the m4 include consumes.
  • Merge gate - merge-bot-pull-request.yml and the AGENTS.md Merge Gate subsection carried from the template (preconditions, CLEAN-is-never-sufficient, "merging is not releasing").
  • EOL/line-ending pins - workflow YAML, .editorconfig, .gitattributes, AGENTS.md, and CODESTYLE.md are CRLF (this repo's convention, matched to the template's tracked bytes); Docker/Dockerfile and Docker/README.m4 are LF per the carried Dockerfile/m4 pins. Content-only diffs verified with --ignore-cr-at-eol / --strip-trailing-cr.

Documented adaptations (for review)

These are the only intentional deviations from a literal verbatim carry. They are recorded in the repo's AGENTS.md "Template adaptations" block; each has a one-line rationale below.

  • .editorconfig - repo-wide [*.cs] CA-rule relaxations. This is a console app, not a library, so several CA analyzer rules are relaxed (documented inline). The template's per-extension EOL block is carried as-is.
  • .gitattributes - .husky/pre-commit text eol=lf and Docker/README.m4 text eol=lf pins. The repo ships an extensionless Husky.Net hook (the exact case the template's script-EOL note calls out) and an m4 source rendered on Linux.
  • .github/copilot-instructions.md - filled ptr727/PlexCleaner, an ARCHITECTURE.md pointer, and .NET-only wording. Already adapted from the template's placeholder/multi-language form; the generic form would be a regression.
  • CODESTYLE.md - carried whole from the template (genericized: placeholder project names, both .NET and Python language sections). Kept verbatim rather than localized; this repo's real project names live in .csproj/.editorconfig, not the style guide. (See the template-gap note below.)
  • Husky.Net pre-commit hooks. The repo runs Husky.Net (.husky/ hook runner + a Husky.Net Run VS Code task), inverting the template's no-hooks-by-default stance.
  • .vscode/tasks.json - .Net task-label casing and this repo's Docker/Husky convenience tasks. The .Net casing is a documented historical choice; the clean-compile task command sequences match the template.

Template gap (for the maintainer)

The genericized whole-file CODESTYLE.md carries content that does not literally apply to a single-language derived repo - .NET-casing guidance vs this repo's .Net task labels, a "no git hooks by default" stance vs this repo's Husky.Net hook, and a Python language section in a .NET-only repo. These are inert here (the authoritative task/hook facts live in .vscode/tasks.json and the AGENTS adaptations block), but every derived repo will surface the same mismatches. Worth deciding upstream whether the template should ship a way to scope CODESTYLE's language/task sections per derived repo, or keep the whole-file carry as the standing convention. Filed for the template hub rather than patched locally.

Validation

  • actionlint: clean (exit 0) on the changed workflows.
  • markdownlint-cli2: 0 errors on AGENTS.md / CODESTYLE.md.
  • Copilot review: clean on the current head (all inline findings triaged - factually incorrect or documented adaptations - replied and resolved).

- publish-docker-readme-task.yml: carry the enriched template task (get-repos
  job, manifest/transform/readme-filepath inputs) and rewire the m4 render onto
  it via transform-run + transform-artifact (versions-main), retiring the
  bespoke inline render. Caller-gate to main in publish-release.yml.
- AGENTS.md: carry PR Review Etiquette verbatim (mandatory callout + Merge Gate);
  add a Template adaptations block.
- CODESTYLE.md: carry the new General governance (commit-gate-is-a-choice;
  brownfield git-signing allowance note).
- .editorconfig / .gitattributes: Dockerfile + .husky/pre-commit LF pins;
  renormalize Docker/Dockerfile to LF.
Copilot AI review requested due to automatic review settings June 24, 2026 17:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Syncs PlexCleaner’s develop branch with newer ProjectTemplate deltas, focusing on Docker Hub README publishing workflow enrichment and governance/EOL pin alignment.

Changes:

  • Replaces publish-docker-readme-task.yml with an enriched reusable workflow that can derive repositories, optionally download an artifact, and run a transform before publishing.
  • Rewires publish-release.yml to call the enriched Docker Hub README task (main-only) and render via m4 using the versions-main artifact.
  • Updates governance/docs and line-ending normalization rules (Dockerfile LF pins via .editorconfig / .gitattributes; Dockerfile renormalized).

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Docker/Dockerfile LF renormalization (no functional content change).
CODESTYLE.md Carries template governance additions around local hooks and brownfield allowances.
AGENTS.md Carries updated PR Review Etiquette (incl. Merge Gate) and documents template adaptations.
.github/workflows/publish-release.yml Updates Docker Hub README publishing to use the enriched reusable task and main-only gating.
.github/workflows/publish-docker-readme-task.yml New enriched reusable workflow for publishing Docker Hub repository overviews with optional transform/artifact steps.
.gitattributes Adds LF pinning for scripts and Dockerfiles (and Husky hook) while keeping * -text default.
.editorconfig Adds Dockerfile LF EOL pins and documents the repo’s CA-relaxation adaptation block.

Comment thread .github/workflows/publish-docker-readme-task.yml Outdated
Comment thread .github/workflows/publish-docker-readme-task.yml Outdated
Comment thread .github/workflows/publish-docker-readme-task.yml Outdated
Comment thread .github/workflows/publish-docker-readme-task.yml Outdated
Comment thread .github/workflows/publish-docker-readme-task.yml Outdated
ptr727 and others added 2 commits June 24, 2026 10:21
Supervisor corrections to match the rest of the fleet: carry the genericized
CODESTYLE.md whole (was kept localized); conform workflow YAML to the template's
CRLF (was mixed LF, like KiCad which the maintainer ruled conform); pin and
normalize Docker/README.m4 to LF. Move the .NET/Husky.Net specifics from CODESTYLE
into AGENTS adaptations.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PlexCleaner's build-datebadge-task.yml was the old self-gating version (branch
input, unquoted $GITHUB_OUTPUT -> SC2086). Carry the template's caller-gated
version verbatim and rewire the publish-release caller to a single main-gated job
(no branch input), matching the rest of the fleet.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 24, 2026 17:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 16 changed files in this pull request and generated 6 comments.

Comment thread CODESTYLE.md
Comment thread CODESTYLE.md
Comment thread CODESTYLE.md
Comment thread CODESTYLE.md Outdated
Comment thread CODESTYLE.md Outdated
Comment thread .github/workflows/publish-docker-readme-task.yml
…eadme tasks

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ptr727 ptr727 requested a review from Copilot June 24, 2026 18:44
Copilot stopped reviewing on behalf of ptr727 due to an error June 24, 2026 19:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 16 changed files in this pull request and generated 7 comments.

Comment thread CODESTYLE.md
Comment thread CODESTYLE.md
Comment thread CODESTYLE.md Outdated
Comment thread .github/workflows/build-release-task.yml
Comment thread .github/workflows/build-release-task.yml
Comment thread .github/workflows/publish-release.yml
Comment thread .github/workflows/publish-docker-readme-task.yml
ptr727 and others added 2 commits June 24, 2026 12:15
The docker-readme job uses transform-artifact (download-artifact) to fetch the
tool-versions artifact for the m4 render, which needs actions: read - add it so the
job works where default token permissions are restricted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 25, 2026 00:34
Copilot stopped reviewing on behalf of ptr727 due to an error June 25, 2026 00:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 16 changed files in this pull request and generated 6 comments.

Comment thread CODESTYLE.md
Comment thread CODESTYLE.md
Comment thread CODESTYLE.md
Comment thread .github/workflows/publish-docker-readme-task.yml
Comment on lines +53 to +59
FILE="${{ inputs.branch == 'main' && 'latest.ver' || 'develop.ver' }}"
echo OS: $(. /etc/os-release; echo $PRETTY_NAME) >> /versions/$FILE
echo dotNET: $(dotnet --info) >> /versions/$FILE
echo PlexCleaner: $(/PlexCleaner/PlexCleaner --version) >> /versions/$FILE
echo HandBrakeCLI: $(HandBrakeCLI --version) >> /versions/$FILE
echo MediaInfo: $(mediainfo --version) >> /versions/$FILE
echo MkvMerge: $(mkvmerge --version) >> /versions/$FILE

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Deferring to the maintainer's full re-review. This points at build-toolversions-task.yml, which is outside the scope of this template-sync commit (which re-carries only CODESTYLE.md and publish-docker-readme-task.yml); this line was not introduced or changed here. The multi-line-readability point is a reasonable nit but a repo-owned decision on a per-repo workflow - leaving this thread open for the maintainer to weigh rather than guess-editing an out-of-scope file.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Deferring this to the maintainer end-gate review as a design decision (generated .ver readability vs. single-line format).

Comment thread Docker/README.m4
## Docker Tags

- `latest`:
- Based on [Ubuntu Rolling](https://releases.ubuntu.com/) `ubuntu:rolling` latest stable release base image.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Deferring to the maintainer's full re-review. This points at Docker/README.m4, which is outside the scope of this template-sync commit (re-carrying only CODESTYLE.md and publish-docker-readme-task.yml); this wording was not introduced or changed here. The ubuntu:rolling phrasing is a repo-owned documentation choice (rolling is in fact the intended base) - leaving this thread open for the maintainer rather than rewording an out-of-scope file.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Deferring the ubuntu:rolling wording to the maintainer end-gate review as a design decision.

ptr727 and others added 2 commits June 24, 2026 18:51
…' wording)

The template carries CODESTYLE.md whole; unused-language sections stay inert. (issue #208)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 25, 2026 02:13
Carry the template's best-effort artifact-cleanup job so publish-run artifacts
don't accumulate against the account-wide storage quota. (issue #208)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 16 changed files in this pull request and generated 3 comments.

Comment thread .gitattributes Outdated
Comment thread .github/workflows/build-datebadge-task.yml
Comment thread Docker/README.m4
Comment on lines +25 to +26
- Based on [Ubuntu Rolling](https://releases.ubuntu.com/) `ubuntu:rolling` latest stable release base image.
- Multi-architecture image supporting `linux/amd64` and `linux/arm64` builds.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Deferring to the maintainer, consistent with the identical finding already deferred on the line-25 thread. This ubuntu:rolling latest stable release phrasing lives in Docker/README.m4, which is PlexCleaner-repo-owned content (no equivalent file exists in the template, so it is outside this template-sync's re-carry scope). The accuracy nit is fair - ubuntu:rolling tracks the rolling series rather than a stable release - but it is a repo-owned documentation wording choice; leaving open for your call rather than rewording an out-of-scope file.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Deferring the ubuntu:rolling wording to the maintainer end-gate review as a design decision.

Carry the current template merge-bot (pull_request_target, per-PR concurrency,
cancel-in-progress: false, opened/reopened guard, disable-auto-merge-on-maintainer-push),
pruning merge-codegen/merge-upstream-version (no such mechanisms here). Update the
Branching Model doc: maintainer pushes now DISABLE auto-merge (was: still auto-merge). (issue #208)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 25, 2026 02:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 16 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/build-datebadge-task.yml Outdated
ptr727 and others added 2 commits June 24, 2026 19:43
Replace typographic Unicode introduced in this PR's added lines with the ASCII
forms the template mandates; pre-existing maintainer Unicode is left untouched. (issue #209)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The `* -text` default is what governs git normalization; the
.editorconfig end_of_line rules govern the editor side. Match the
template's header wording so the comment no longer reads as if
.editorconfig enforces git checkout/renormalize EOL.
Copilot AI review requested due to automatic review settings June 25, 2026 03:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 16 changed files in this pull request and generated 2 comments.

Comment on lines +75 to +82
if: >-
github.event.action == 'synchronize' &&
github.event.pull_request.head.repo.full_name == github.repository &&
(
github.event.pull_request.user.login == 'dependabot[bot]' ||
github.event.pull_request.user.login == 'ptr727-codegen[bot]'
) &&
github.actor != github.event.pull_request.user.login

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Deferring to the maintainer: keeping/removing the ptr727-codegen[bot] clause is a per-repo subset decision for the end-gate review.

Comment on lines +6 to +8
on:
workflow_call:

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Deferring to the maintainer: ARCHITECTURE.md is repo-owned, and date-badge is now caller-gated (no branch input) - noting it for the end-gate doc review.

- .gitattributes: header distinguishes editor guidance from git enforcement
- CODESTYLE.md: .NET/Python intros made conditional ("any ... project(s)")
- AGENTS.md: publish step covers opted-in publish-on-merge trigger
- build-datebadge-task.yml: BYOB pinned to v1.3.0 SHA 24f4642

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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