File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11name : Test PR
22on :
3- pull_request : {}
3+ pull_request_target : {}
44
55jobs :
66 test :
@@ -19,11 +19,14 @@ jobs:
1919 });
2020
2121 const packages = new Set();
22+ let bundlerChanges = false;
2223 files.forEach(file => {
2324 const match = file.filename.match(/^packages\/preview\/([^\/]+)\/([^\/]+)\//);
2425 if (match) {
2526 packages.add({ namespace: "preview", name: match[1], version: match[2] });
2627 }
28+
29+ bundlerChanges = bundlerChanges || file.filename.startsWith("bundler/");
2730 });
2831
2932 let sparseCheckoutPaths;
3336 sparseCheckoutPaths = Array.from(packages).map((pkg) => `packages/preview/${pkg.name}/${pkg.version}/`).join('\n');
3437 }
3538 core.setOutput('sparse-checkout-paths', sparseCheckoutPaths);
36-
39+ core.setOutput('bundler-changes', bundlerChanges);
40+ - name : Require approval for bundler changes
41+ if : ${{ steps.extract-package.outputs.bundler-changes && ! contains(github.event.pull_request.labels.*.name, 'safe-bundler-changes') }}
42+ run : echo "The changes made to the bundler needs to be approved first." && false
3743 - uses : actions/checkout@v4
3844 with :
3945 sparse-checkout : |
You can’t perform that action at this time.
0 commit comments