Skip to content

Commit e0080e5

Browse files
authored
🐛 Fix Watch Previews action
1 parent e1ba54b commit e0080e5

File tree

1 file changed

+3
-2
lines changed
  • .github/actions/watch-previews/app

1 file changed

+3
-2
lines changed

.github/actions/watch-previews/app/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def get_message(commit: str) -> str:
6767
notified = True
6868
logging.info(f"Docs preview was notified: {notified}")
6969
if not notified:
70+
artifact_name = f"docs-zip-{commit}"
7071
response = httpx.get(
7172
f"{github_api}/repos/{settings.github_repository}/actions/artifacts",
7273
headers=headers,
@@ -75,7 +76,7 @@ def get_message(commit: str) -> str:
7576
artifacts_response = ArtifactResponse.parse_obj(data)
7677
use_artifact: Optional[Artifact] = None
7778
for artifact in artifacts_response.artifacts:
78-
if artifact.name == settings.input_name:
79+
if artifact.name == artifact_name:
7980
use_artifact = artifact
8081
break
8182
if use_artifact:
@@ -85,7 +86,7 @@ def get_message(commit: str) -> str:
8586
headers=headers,
8687
json={
8788
"ref": "master",
88-
"inputs": {"pr": f"{pr.number}", "name": f"docs-zip-{commit}"},
89+
"inputs": {"pr": f"{pr.number}", "name": artifact_name},
8990
},
9091
)
9192
logging.info(

0 commit comments

Comments
 (0)