diff --git a/src/compwa_policy/.template/CONTRIBUTING.md.jinja b/src/compwa_policy/.template/CONTRIBUTING.md.jinja index 4c9f0ae4..54f85c39 100644 --- a/src/compwa_policy/.template/CONTRIBUTING.md.jinja +++ b/src/compwa_policy/.template/CONTRIBUTING.md.jinja @@ -1,6 +1,6 @@ # How to contribute? -[![Open in Visual Studio Code](https://img.shields.io/badge/vscode-open-blue?logo=visualstudiocode)](https://github.dev/ComPWA/{{ REPO_NAME }}) +[![Open in Visual Studio Code](https://img.shields.io/badge/vscode-open-blue?logo=visualstudiocode)](https://github.dev/{{ ORGANIZATION }}/{{ REPO_NAME }}) > [!TIP] > This package is part of the [ComPWA Organization](https://github.com/ComPWA). For more information about how to contribute to the packages, go to **[compwa.github.io/develop](https://compwa.github.io/develop)**! @@ -8,7 +8,7 @@ To contribute to the project, you need to install the package in a virtual environment. This can be done best with [`uv`](https://docs.astral.sh/uv) (see installation instructions [here](https://docs.astral.sh/uv/getting-started/installation)). For this, you first need to get the source code with [Git](https://git-scm.com): ```shell -git clone https://github.com/ComPWA/{{ REPO_NAME }} +git clone https://github.com/{{ ORGANIZATION }}/{{ REPO_NAME }} cd {{ REPO_NAME }} ``` diff --git a/src/compwa_policy/check_dev_files/__init__.py b/src/compwa_policy/check_dev_files/__init__.py index 66934725..a363c1dc 100644 --- a/src/compwa_policy/check_dev_files/__init__.py +++ b/src/compwa_policy/check_dev_files/__init__.py @@ -146,6 +146,7 @@ def main(argv: Sequence[str] | None = None) -> int: # noqa: PLR0915 dev_python_version, package_manager, precommit_config, + args.repo_organization, repo_name, ) do(cspell.main, precommit_config, args.no_cspell_update) diff --git a/src/compwa_policy/check_dev_files/uv.py b/src/compwa_policy/check_dev_files/uv.py index ab61f4a1..31f6c29b 100644 --- a/src/compwa_policy/check_dev_files/uv.py +++ b/src/compwa_policy/check_dev_files/uv.py @@ -26,6 +26,7 @@ def main( dev_python_version: PythonVersion, package_manager: PackageManagerChoice, precommit_config: ModifiablePrecommit, + organization: str, repo_name: str, ) -> None: with Executor() as do: @@ -38,7 +39,7 @@ def main( do(_update_editor_config) do(_update_python_version_file, dev_python_version) do(_update_uv_lock_hook, precommit_config) - do(_update_contributing_file, repo_name) + do(_update_contributing_file, organization, repo_name) do(_remove_pip_constraint_files) do( vscode.remove_settings, @@ -156,7 +157,7 @@ def _update_uv_lock_hook(precommit: ModifiablePrecommit) -> None: precommit.remove_hook("uv-lock") -def _update_contributing_file(repo_name: str) -> None: +def _update_contributing_file(organization: str, repo_name: str) -> None: contributing_file = Path("CONTRIBUTING.md") if not contributing_file.exists(): return @@ -166,7 +167,10 @@ def _update_contributing_file(repo_name: str) -> None: loader=FileSystemLoader(template_dir), ) template = env.get_template("CONTRIBUTING.md.jinja") - context = {"REPO_NAME": repo_name} + context = { + "ORGANIZATION": organization, + "REPO_NAME": repo_name, + } expected_content = template.render(context) + "\n" existing_content = "" if contributing_file.exists():