From 50b09e74c05c8f070fe9d71e3de5ad1d8824f125 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 2 Jan 2024 19:22:04 +0100 Subject: [PATCH] mention PR url in body of staging PR --- scripts/automated_ingestion/automated_ingestion.cfg.example | 2 +- scripts/automated_ingestion/eessitarball.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/automated_ingestion/automated_ingestion.cfg.example b/scripts/automated_ingestion/automated_ingestion.cfg.example index 55a4a0bc..b4ff3bbe 100644 --- a/scripts/automated_ingestion/automated_ingestion.cfg.example +++ b/scripts/automated_ingestion/automated_ingestion.cfg.example @@ -42,7 +42,7 @@ failed_tarball_overview_issue_body = An error occurred while trying to get the c ``` {error} ``` -pr_body = A new tarball has been staged. +pr_body = A new tarball has been staged for {pr_url}. Please review the contents of this tarball carefully. Merging this PR will lead to automatic ingestion of the tarball. diff --git a/scripts/automated_ingestion/eessitarball.py b/scripts/automated_ingestion/eessitarball.py index 6b0857dd..4283eb65 100644 --- a/scripts/automated_ingestion/eessitarball.py +++ b/scripts/automated_ingestion/eessitarball.py @@ -280,10 +280,14 @@ def make_approval_request(self): metadata = '' with open(self.local_metadata_path, 'r') as meta: metadata = meta.read() + meta_dict = json.loads(metadata) + repo, pr_id = meta_dict['link2pr']['repo'], meta_dict['link2pr']['pr'] + pr_url = f"https://github.com/{repo}/pull/{pr_id}" # Try to get the tarball contents and open a PR to get approval for the ingestion try: tarball_contents = self.get_contents_overview() pr_body = self.config['github']['pr_body'].format( + pr_url=pr_url, tar_overview=self.get_contents_overview(), metadata=metadata, )