feat(cli): CPLYTM-1291 content sync tool org wide doc#2
feat(cli): CPLYTM-1291 content sync tool org wide doc#2sonupreetam wants to merge 11 commits intocomplytime:mainfrom
Conversation
cd090d6 to
d8e0bf2
Compare
ef80241 to
7726b55
Compare
marcusburghardt
left a comment
There was a problem hiding this comment.
@sonupreetam , I shared some initial considerations. I think the most important would be to rely on peribolos instead of an API call. The reasons are that we may not want to include everything, such as private repositories or eventual testing repositories (it may happen). But everything that is defined in peribolos is formally used so we need less filters and exceptions. This could also simplify the logic and reduce the permission of the token.
0f5b310 to
b3ac7d2
Compare
4b2aefd to
f80aace
Compare
|
@marcusburghardt Thank you for your feedbacks, I have taken care of your suggestions. |
marcusburghardt
left a comment
There was a problem hiding this comment.
I have only two minor comments that could be good but not blocking the PR. Up to you @sonupreetam to incorporate them or not. : ) Thanks
4a59692
98340e9 to
7c5d33c
Compare
|
@sonupreetam , there is a merge commit there. I don't think it was intentional. Could you confirm, please? |
|
It seems we also need a configuration file for mega-linter since the default is enabling more checks than we need. |
9d9321c to
dd8ea4e
Compare
…ment Signed-off-by: Sonu Preetam <spreetam@redhat.com>
…covery Signed-off-by: Sonu Preetam <spreetam@redhat.com>
…cleanup Signed-off-by: Sonu Preetam <spreetam@redhat.com>
Signed-off-by: Sonu Preetam <spreetam@redhat.com>
…egration Signed-off-by: Sonu Preetam <spreetam@redhat.com>
Signed-off-by: Sonu Preetam <spreetam@redhat.com>
Signed-off-by: Sonu Preetam <spreetam@redhat.com>
Signed-off-by: Sonu Preetam <spreetam@redhat.com>
Signed-off-by: Sonu Preetam <spreetam@redhat.com>
Signed-off-by: Sonu Preetam <spreetam@redhat.com>
dd8ea4e to
15e94db
Compare
Signed-off-by: Sonu Preetam <spreetam@redhat.com>
f7c2a81 to
504e063
Compare
Summary
Adds a Go CLI tool (
cmd/sync-content/) that syncs all repos registered in thecomplytimegovernance registry (peribolos.yaml), fetches README content and metadata via the GitHub REST API, applies Markdown transforms, and generates Hugo-compatible project pages and landing page card data. A declarative config overlay (sync-config.yaml) provides precision control for repos needing custom documentation layouts.Key capabilities
peribolos.yaml— new repos appear on the site when added to the governance registrysync-config.yamlcontrols per-repo file destinations, frontmatter injection, and transforms (strip_badges,rewrite_links,inject_frontmatter).content-lock.jsonpins each repo to an approved branch SHA; production deploys fetch content at locked SHAs only--writeflag required for any disk I/O--workers) with race-safe implementationGITHUB_OUTPUTvariables andGITHUB_STEP_SUMMARYfor GitHub ActionsCLI interface
--orgcomplytime--token$GITHUB_TOKEN--configsync-config.yamlfor config-driven file syncs--writefalse--output.--workers5--timeout3m--include--exclude--repocomplytime/complyctl)--summary--lock.content-lock.jsonfor content approval gating--update-lockfalse--lock)Output structure
Reviewer guide
Pre-reading (recommended before reviewing code):
specs/006-go-sync-tool/spec.md— full scope, user stories, acceptance criteriasync-config.yaml— the actual config fileSuggested review order (commits are layered bottom-up by dependency):
Workflow runs (manual dispatch on fork — all green):
Test plan
go vet ./...passesgofmt -l ./cmd/sync-content/reports no unformatted filesgo test -race ./cmd/sync-content/...passes (57 test functions, 10 test files)go run ./cmd/sync-content --org complytime --config sync-config.yamlgo run ./cmd/sync-content --org complytime --config sync-config.yaml --writehugo --minify --gcci.yml) passes on this PR--lockskips repos not in.content-lock.json