Skip to content

Commit

Permalink
wip add the link
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Mar 28, 2024
1 parent 7c2f65f commit 02facad
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/create_or_update_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,19 @@ def main():
break

deployment_url = f"{org_url}/{deployment_name}/home"
changed_assets_url = f"{deployment_url}/asset-groups?changedInBranch=%5B%22CODE_VERSION%22%2C%22INPUTS%22%2C%22NEW%22%2C%22PARTITIONS_DEFINITION%22%5D"

message = f"[View in Cloud]({deployment_url})"
changed_assets_message = f"[View Changed Assets]({changed_assets_url})"
image_url = SUCCESS_IMAGE_URL

if action == "pending":
message = f"[Building...]({github_run_url})"
changed_assets_message = message
image_url = PENDING_IMAGE_URL
elif action == "failed":
message = f"[Deploy failed]({github_run_url})"
changed_assets_message = message
image_url = FAILED_IMAGE_URL

status_image = f'[<img src="{image_url}" width=25 height=25/>]({github_run_url})'
Expand All @@ -67,9 +71,9 @@ def main():
message = f"""
Your pull request is automatically being deployed to Dagster Cloud.
| Location | Status | Link | Updated |
| ----------------- | --------------- | ------- | --------------- |
| `{location_name}` | {status_image} | {message} | {time_str} |
| Location | Status | Link | Jump to Changed Assets | Updated |
| ----------------- | --------------- | ------- | --------------------------- | --------------- |
| `{location_name}` | {status_image} | {message} | {changed_assets_message} | {time_str} |
"""

if comment_to_update:
Expand Down

0 comments on commit 02facad

Please sign in to comment.