Skip to content

ci: consolidate workflows into reusable centralized actions - #134

Merged
dclong merged 1 commit into
mainfrom
push-mxzrplowyszy
Aug 16, 2026
Merged

dclong merged 1 commit into
mainfrom
push-mxzrplowyszy

Conversation

@dclong

@dclong dclong commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • ci: consolidate workflows into reusable centralized actions

Changed files

Added

  • .github/workflows/check_workflow_template.yaml (+48/-0)
  • .github/workflows/create_pr_dev_to_main.yaml (+9/-0)
  • .github/workflows/create_pr_to_dev.yaml (+11/-0)
  • github_rest_api/scripts/github/workflows/release.yaml (+8/-0)
    Modified
  • .github/workflows/pr-workflow.yaml (+1/-4)
  • .github/workflows/release.yaml (+3/-17)
  • github_rest_api/scripts/github/create_github_repo.py (+14/-26)
  • github_rest_api/scripts/github/workflows/claude.yaml (+5/-0)
  • github_rest_api/scripts/github/workflows/create_pr_dev_to_main.yaml (+2/-12)
  • github_rest_api/scripts/github/workflows/create_pr_to_dev.yaml (+2/-12)
  • github_rest_api/scripts/github/workflows/remove_branch.yaml (+2/-11)
  • tests/test_create_github_repo.py (+55/-2)
    Removed
  • .github/workflows/check_workflow_template_extensions.yaml (+0/-18)
    Renamed
  • .github/workflows/claude.yaml (+5/-0)

Commits

  • 634e179 ci: consolidate workflows into reusable centralized actions

@dclong

dclong commented Aug 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

Claude finished @dclong's task in 2m 5s —— View job


Code Review

Todo list

  • Gather context (PR diff, changed files, CLAUDE.md)
  • Understand the request (review via /code-review:code-review)
  • Perform code review
  • Post final review and auto-merge decision

Reviewed with git diff origin/main...HEAD. This PR consolidates repo-specific CI workflows into reusable centralized workflows (legendu-net/.github/.github/workflows/*@main) and adds a CI check (check_workflow_template.yaml) that keeps .github/workflows/*.yaml in sync with the bundled templates under github_rest_api/scripts/github/workflows/. I verified the two directories are currently in sync and that the new sync-check script's bash logic is correct.

Findings

  1. Non-blocking – stale filter value (github_rest_api/scripts/github/create_github_repo.py:21):

    _REPO_ONLY_WORKFLOWS = frozenset({"check_workflow_template_extensions.yaml"})

    This is meant to exclude "repo-only" workflow templates from being copied into repos created by create_github_repo. However, check_workflow_template_extensions.yaml is the file deleted in this same PR — it never existed under github_rest_api/scripts/github/workflows/ (the actual template source dir), so this exclusion is currently a no-op in production. The new repo-only workflow added by this PR, check_workflow_template.yaml, also isn't present in the template dir, so nothing is broken today, but the constant references a filename that no longer exists anywhere in the repo. Consider removing it or, if kept for future-proofing, renaming it to reflect an actual/expected repo-only template filename. Covered by tests using synthetic directories (tests/test_create_github_repo.py), so it's not a functional bug — just dead/confusing code.
    Fix this →

  2. Verified: _add_workflow, _init_local_repo, and create_github_repo signature changes (removal of language) are consistently propagated — no remaining references to the removed --language/-l CLI flag in code or docs.

  3. Verified: .github/workflows/*.yaml and github_rest_api/scripts/github/workflows/*.yaml are byte-identical for all shared workflow names, matching what check_workflow_template.yaml's new sync check enforces.

  4. Verified: claude.yaml rename (.yml → .yaml) is consistent with the new "no .yml extension" check, and the added permissions block is mirrored in both copies.

  5. New tests in tests/test_create_github_repo.py reasonably cover _add_workflow's copy/skip/no-overwrite/missing-dir behavior.

Note: I was unable to run uv run pytest, uv run ruff check, or other uv run ... commands in this sandbox — they require approval that wasn't granted in this session. Review is based on static analysis of the diff only. If you'd like automated test/lint execution as part of this review, the --allowedTools for this job would need to permit Bash(uv run *).

No correctness bugs found; the one finding above is a non-blocking cleanup item.

AUTO_MERGE_APPROVED

@dclong
dclong force-pushed the push-mxzrplowyszy branch from 634e179 to f8374af Compare August 16, 2026 06:17
@dclong

dclong commented Aug 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

Claude finished @dclong's task in 1m 38s —— View job


Code Review

Todo list

  • Gather context (PR diff, changed files, CLAUDE.md)
  • Understand the request (review via /code-review:code-review)
  • Perform code review
  • Post final review and auto-merge decision

Reviewed with git diff origin/main...HEAD (current HEAD: f8374af). This PR consolidates repo-specific CI workflows into reusable centralized workflows (legendu-net/.github/.github/workflows/*@main) and adds a CI check (check_workflow_template.yaml) that keeps .github/workflows/*.yaml in sync with the bundled templates under github_rest_api/scripts/github/workflows/.

Findings

No blocking issues found.

  1. Previously-flagged issue is now fixed. An earlier review of this PR found that _REPO_ONLY_WORKFLOWS in github_rest_api/scripts/github/create_github_repo.py referenced the deleted check_workflow_template_extensions.yaml instead of the new check_workflow_template.yaml. That has since been corrected — _REPO_ONLY_WORKFLOWS = frozenset({"check_workflow_template.yaml"}) now matches the actual repo-only template added by this PR, and tests/test_create_github_repo.py (test_add_workflow_copies_templates_and_skips_repo_only_ones, test_add_workflow_raises_when_template_dir_has_only_repo_only_workflows) exercises this correctly. No remaining references to check_workflow_template_extensions.yaml anywhere in the repo.
  2. Verified .github/workflows/*.yaml and github_rest_api/scripts/github/workflows/*.yaml are byte-identical for all shared workflow names (diff -rq confirms the only difference is the intentionally repo-only check_workflow_template.yaml), matching what the new check_workflow_template.yaml CI check enforces (both the "in sync" direction and the "no orphaned template" direction).
  3. Verified the .yml→.yaml extension check and the sync-check bash logic in .github/workflows/check_workflow_template.yaml are correct, including the repo-only exclusion list and bidirectional sync verification.
  4. Verified _add_workflow, _init_local_repo, and create_github_repo signature changes (removal of language/--lang/--language) are fully propagated — no remaining references to the removed flag in code or elsewhere.
  5. claude.yaml rename (.yml→.yaml) is consistent with the new extension check, and the added permissions block (actions: read, issues: read, pull-requests: read, id-token: write) is mirrored identically in both the repo and template copies.
  6. _add_workflow's new FileNotFoundError behavior when no non-repo-only templates exist is reasonable and covered by tests (missing dir, dir with only repo-only workflows).
  7. release.yaml now delegates to a centralized reusable workflow (legendu-net/.github/.github/workflows/release.yaml@main) instead of inlining the PyPI publish steps; this is external to this repo and can't be statically verified here, but it's consistent with the PR's stated consolidation goal and mirrors the pattern used by the other workflows in this PR.

Note: As with the prior review pass, I was unable to run uv run pytest, uv run ruff check, or other uv run ... commands in this sandbox — they require approval that wasn't granted in this session. Review is based on static analysis of the diff. If automated test/lint execution is desired as part of this review, the --allowedTools for this job would need to permit Bash(uv run *).

AUTO_MERGE_APPROVED

@dclong
dclong merged commit f2e011a into main Aug 16, 2026
21 checks passed
@dclong
dclong deleted the push-mxzrplowyszy branch August 17, 2026 10:35
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