Skip to content

feat: automated template rename workflow#2

Merged
rdurica merged 2 commits into
mainfrom
feat/template-auto-rename
May 13, 2026
Merged

feat: automated template rename workflow#2
rdurica merged 2 commits into
mainfrom
feat/template-auto-rename

Conversation

@rdurica
Copy link
Copy Markdown
Owner

@rdurica rdurica commented May 13, 2026

Summary

Automaticky přejmenuje projekt při vytvoření z GitHub template.

Když někdo vytvoří nové repo z template a pushne do main, GitHub Actions workflow:

  1. Ovodí názvy z GITHUB_REPOSITORY (kebab-case, snake_case, Title Case, PascalCase)
  2. Přejmenuje service name, container name, devcontainer name, DB credentials, APP_NAME, nadpisy a odkazy
  3. Commitne změny a smaže sám sebe

Změněné soubory při běhu workflow

  • compose.yaml — service name + container_name
  • compose.demo.yaml — image name, DB credentials
  • .devcontainer/devcontainer.json — name, service
  • makefile — exec references
  • demo.env — APP_NAME, DB_DATABASE, DB_USERNAME, DB_PASSWORD
  • build/prod/docker-entrypoint.sh — log message
  • src/public/index.php — title, badge, footer
  • README.md — title, git URL, badge URL, cd directory
  • AGENTS.md — title, exec commands

Nové soubory v tomto PR

  • .github/workflows/template-setup.yml — workflow
  • .github/scripts/rename-template.py — rename skript

Test plan

  • Vytvořit test repo z template
  • Pushnout do main
  • Ověřit, že workflow proběhl v Actions tabu
  • Zkontrolovat, že soubory mají správné názvy
  • Ověřit, že workflow soubor zmizel

🤖 Generated with Claude Code

When a new repository is created from this template, a GitHub Actions
workflow automatically renames all hardcoded "PHP Starter Kit" references
based on the new repository name. The workflow:

- Derives kebab-case, snake_case, Title Case, and PascalCase variants
- Updates compose.yaml, compose.demo.yaml, devcontainer.json, makefile,
  demo.env, docker-entrypoint.sh, index.php, README.md, and AGENTS.md
- Creates a marker file for idempotency
- Self-destructs after running to avoid clutter in the new repo

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@gitguardian
Copy link
Copy Markdown

gitguardian Bot commented May 13, 2026

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
32569123 Triggered Username Password e548c8f .github/scripts/rename-template.py View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

- Delete compose.demo.yaml and demo.env
- Remove demo compose validation from CI and code-quality workflows
- Remove Demo section from README
- Remove demo file handling from template rename script

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Owner Author

@rdurica rdurica left a comment

Choose a reason for hiding this comment

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

OK

@rdurica rdurica merged commit 41845e2 into main May 13, 2026
7 checks passed
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