diff --git a/.github/workflows/pycafe-dashboards-in-CI.yml b/.github/workflows/pycafe-dashboards-in-CI.yml index ded28cc37..ac181bfdd 100644 --- a/.github/workflows/pycafe-dashboards-in-CI.yml +++ b/.github/workflows/pycafe-dashboards-in-CI.yml @@ -39,23 +39,6 @@ jobs: path: vizro-core/dist/*.whl retention-days: 5 - # - name: Fetch latest commit from target branch - # run: | - # # git fetch origin ${{ github.ref_name }} - # latest_commit=${{ github.sha }} - # echo "COMMIT_HASH=$latest_commit" >> $GITHUB_ENV - # run_id=${{ github.run_id }} - # echo "RUN_ID=$run_id" >> $GITHUB_ENV - - # - name: Display latest commit - # run: | - # echo "Latest commit on target branch: ${{ env.COMMIT_HASH }}" - # echo "Latest run id: ${{ env.RUN_ID }}" - - # - name: Run Py.Cafe tool - # run: | - # python tools/pycafe/create_py_cafe_url.py - - name: Run Github Tool env: GITHUB_TOKEN: ${{ github.token }} diff --git a/tools/pycafe/test.py b/tools/pycafe/test.py index 432315285..632b84472 100644 --- a/tools/pycafe/test.py +++ b/tools/pycafe/test.py @@ -82,9 +82,9 @@ def post_comment(urls: list[tuple[str, str]]): # Find existing comments by the bot comments = pr.get_issue_comments() bot_comment = None - + print(comments) for comment in comments: - if comment.body.startswith("iew the dashboard live on PyCafe:"): + if comment.body.startswith("View the dashboard live on PyCafe:"): bot_comment = comment break @@ -93,10 +93,15 @@ def post_comment(urls: list[tuple[str, str]]): # Define the comment body with datetime # comment_body = f"Test Environment for [{REPO_NAME}-{PR_NUMBER}]({link})\nUpdated on: {current_utc_time}" - comment_body = "\n\n".join( - f"View the dashboard live on PyCafe: [{directory}]({url})\n\nUpdated on: {current_utc_time}" - for url, directory in urls - ) + dashboards = "\n\n".join(f"View the dashboard live on PyCafe: [{directory}]({url})" for url, directory in urls) + + comment_body = f"""View the example dashboards of the current commit live on PyCafe: +Updated on: {current_utc_time} + +Commit: {commit_sha} + +{dashboards} +""" # Update the existing comment or create a new one if bot_comment: