From 19184d0c74ee05c19d7a7b5b0fa578aebd855016 Mon Sep 17 00:00:00 2001 From: marksverdhei Date: Sat, 28 Mar 2026 23:28:02 +0000 Subject: [PATCH] fix: replace placeholder description in pyproject.toml during template init When a repo has a GitHub description set, template-init.yml now replaces the "Add your description here" placeholder with the actual description. If no description is set, the placeholder line is removed entirely. Closes #13 Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/template-init.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/template-init.yml b/.github/workflows/template-init.yml index 79b3372..0093174 100644 --- a/.github/workflows/template-init.yml +++ b/.github/workflows/template-init.yml @@ -43,11 +43,18 @@ jobs: run: | repo_slug="${{ steps.names.outputs.repo_slug }}" repo_snake="${{ steps.names.outputs.repo_snake }}" + repo_desc="${{ github.event.repository.description }}" # replace dash-style placeholder grep -lr --exclude-dir=.git 'python-template' . | xargs -r sed -i "s/python-template/${repo_slug}/g" # replace snake_case placeholder grep -lr --exclude-dir=.git 'python_template' . | xargs -r sed -i "s/python_template/${repo_snake}/g" + # replace pyproject.toml description placeholder + if [ -n "$repo_desc" ]; then + sed -i "s/Add your description here/${repo_desc}/" pyproject.toml + else + sed -i '/^description = "Add your description here"/d' pyproject.toml + fi - name: Rename files and directories run: |