File tree Expand file tree Collapse file tree 1 file changed +25
-7
lines changed
Expand file tree Collapse file tree 1 file changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -153,13 +153,31 @@ jobs:
153153 '```',
154154 ].join('\n');
155155
156- await github.rest.pulls.createReview({
157- owner: context.repo.owner,
158- repo: context.repo.repo,
159- pull_number: context.issue.number,
160- event: 'REQUEST_CHANGES',
161- body
162- });
156+ let reviewPosted = false;
157+
158+ if (!isFork) {
159+ try {
160+ await github.rest.pulls.createReview({
161+ owner: context.repo.owner,
162+ repo: context.repo.repo,
163+ pull_number: context.issue.number,
164+ event: 'REQUEST_CHANGES',
165+ body
166+ });
167+ reviewPosted = true;
168+ } catch (error) {
169+ core.warning(
170+ `Could not create PR review (continuing with failure report): ${error.message}`
171+ );
172+ }
173+ } else {
174+ core.warning('PR is from a fork; skipping createReview to avoid permission errors.');
175+ }
176+
177+ if (!reviewPosted) {
178+ core.warning('Materialized plugin issues detected. Full details:');
179+ core.warning(body);
180+ }
163181
164182 core.setFailed('Plugin directories contain materialized files or symlinks that should not be on staged');
165183 } else {
You can’t perform that action at this time.
0 commit comments