Skip to content

fix: keep readme-weaver partials out of the scan and the auto-commit - #13

Merged
shmileee merged 3 commits into
mainfrom
fix/readme-weaver-partials
Nov 15, 2026
Merged

shmileee merged 3 commits into
mainfrom
fix/readme-weaver-partials

Conversation

@shmileee

Copy link
Copy Markdown
Contributor

Description

The readme-weaver reusable workflow could not succeed in any repository:

  1. It checked out devops-roast/.github into ./partials, inside the calling repository. readme-weaver scans **/*.md from the workspace root, so it also processed partials/README.md. That file's include path (common-markdown/sponsorship.md) is relative to the .github repo root, not to README_WEAVER_BASE, so the run failed with FileNotFoundError ... partials/common-markdown/common-markdown/sponsorship.md.
  2. Had it got past that, git-auto-commit-action (default file_pattern: .) would have committed partials into the calling repo as an embedded git repository (gitlink).

Changes:

  • Check out the partials into a hidden .readme-weaver-partials directory. Python's glob('**/*.md') skips hidden directories, so only the calling repo's markdown is processed.
  • Add that directory to .git/info/exclude so the auto-commit never picks it up.
  • Pin the partials checkout to the same actions/checkout SHA as the other steps.

Tested end to end from devops-roast/pre-commit-hooks#8, which temporarily points at this branch.

Definition of Done

  • The change is thoroughly documented.
  • The CI passes (linter, unit tests, spelling, etc.).
  • Any generated files have been updated.

Check out devops-roast/.github into a hidden .readme-weaver-partials
directory and add it to .git/info/exclude. Previously it was checked out
into ./partials, so readme-weaver also processed partials/README.md
(whose include path does not resolve against the base directory) and
crashed, and git-auto-commit-action would have committed the checkout as
an embedded repository.
v0.1.2 produces mdformat-stable output, so readme-weaver and pre-commit
no longer rewrite each other's auto-commits.
@shmileee
shmileee merged commit 9f26089 into main Nov 15, 2026
1 check passed
@shmileee
shmileee deleted the fix/readme-weaver-partials branch November 15, 2026 19:46
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