You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,6 +125,8 @@ on:
125
125
workflow_run:
126
126
workflows: ["PR Preview - Build"]
127
127
types: [completed]
128
+
pull_request_target:
129
+
types: [edited]
128
130
129
131
permissions:
130
132
contents: write
@@ -144,7 +146,7 @@ jobs:
144
146
145
147
You do not need to create `secrets.GITHUB_TOKEN`; GitHub provides it automatically to each workflow run.
146
148
147
-
Open a pull request. The build workflow runs `npm ci && npm run build:plugin-zip`. After that succeeds, the publish workflow uploads the resulting ZIP to a public release URL and posts the Preview button. When someone clicks it, Playground installs and activates the built plugin.
149
+
Open a pull request. The build workflow runs `npm ci && npm run build:plugin-zip`. After that succeeds, the publish workflow uploads the resulting ZIP to a public release URL and posts the Preview button. When someone clicks it, Playground installs and activates the built plugin. If the publish workflow also listens to `pull_request_target: edited`, editing the PR description refreshes the existing preview button/comment against the latest published artifact for the current PR head.
148
150
149
151
Expected result:
150
152
@@ -579,8 +581,9 @@ splits the work at the artifact boundary:
579
581
The publish workflow has a runtime guard that **fails loudly** if invoked from
580
582
any trigger other than `workflow_run`. Non-PR source runs and failed build runs
581
583
skip intentionally because there is no successful PR preview to publish.
582
-
Misconfigured callers (for example someone reaches for `pull_request_target`)
583
-
get a red failure instead of a silent skip.
584
+
Misconfigured callers get a red failure instead of a silent skip. The one
585
+
exception is `pull_request_target` for PR description edits, which may refresh
586
+
an already-published preview without rebuilding or reading PR code.
584
587
585
588
Because the publish workflow is privileged, its third-party action references
586
589
are pinned to commit SHAs. This avoids granting write permissions to a moved
0 commit comments