diff --git a/conda_forge_tick/migrators/migration_yaml.py b/conda_forge_tick/migrators/migration_yaml.py index 1af40c955..3a19d6511 100644 --- a/conda_forge_tick/migrators/migration_yaml.py +++ b/conda_forge_tick/migrators/migration_yaml.py @@ -18,6 +18,7 @@ from conda_forge_tick.utils import ( get_bot_run_url, get_keys_default, + get_migrator_name, pluck, yaml_safe_dump, yaml_safe_load, @@ -285,10 +286,12 @@ def migrate( def pr_body(self, feedstock_ctx: ClonedFeedstockContext) -> str: body = super().pr_body(feedstock_ctx) + name = get_migrator_name(self) + url = f"https://conda-forge.org/status/migration/?name={name}" if feedstock_ctx.feedstock_name == "conda-forge-pinning": additional_body = ( "This PR has been triggered in an effort to close out the " - "migration for **{name}**.\n\n" + "migration for [**{name}**]({url}).\n\n" "Notes and instructions for merging this PR:\n" "1. Please merge the PR only after the tests have passed. \n" "2. Feel free to push to the bot's branch to update this PR " @@ -299,12 +302,14 @@ def pr_body(self, feedstock_ctx: ClonedFeedstockContext) -> str: "the your rebuild has been merged.**\n\n" "
" "".format( - name=self.name, + name=name, + url=url, ) ) else: additional_body = ( - "This PR has been triggered in an effort to update **{name}**.\n\n" + "This PR has been triggered in an effort to update " + "[**{name}**]({url}).\n\n" "Notes and instructions for merging this PR:\n" "1. Please merge the PR only after the tests have passed. \n" "2. Feel free to push to the bot's branch to update this PR " @@ -315,7 +320,8 @@ def pr_body(self, feedstock_ctx: ClonedFeedstockContext) -> str: "the your rebuild has been merged.**\n\n" "
" "".format( - name=self.name, + name=name, + url=url, ) ) diff --git a/tests/test_container_tasks.py b/tests/test_container_tasks.py index 5c3af791e..81e7a0aac 100644 --- a/tests/test_container_tasks.py +++ b/tests/test_container_tasks.py @@ -644,7 +644,8 @@ def test_migration_runner_run_migration_containerized_yaml_rebuild(tmpdir): assert migration_data["commit_message"] == "Rebuild for hi" assert migration_data["pr_title"] == "Rebuild for hi" assert migration_data["pr_body"].startswith( - "This PR has been triggered in an effort to update **hi**." + "This PR has been triggered in an effort to update " + "[**hi**](https://conda-forge.org/status/migration/?name=hi)." ) with open(os.path.join(rp_dir, "meta.yaml")) as f: diff --git a/tests/test_migration_runner.py b/tests/test_migration_runner.py index 6aae93c41..ef875fa6d 100644 --- a/tests/test_migration_runner.py +++ b/tests/test_migration_runner.py @@ -65,7 +65,8 @@ def test_migration_runner_run_migration_local_yaml_rebuild(tmpdir): assert migration_data["commit_message"] == "Rebuild for hi" assert migration_data["pr_title"] == "Rebuild for hi" assert migration_data["pr_body"].startswith( - "This PR has been triggered in an effort to update **hi**." + "This PR has been triggered in an effort to update " + "[**hi**](https://conda-forge.org/status/migration/?name=hi)." ) with open(os.path.join(tmpdir, "recipe/meta.yaml")) as f: