diff --git a/bin/close-subsplit-prs.yml b/bin/close-subsplit-prs.yml new file mode 100644 index 000000000..2fd8d7430 --- /dev/null +++ b/bin/close-subsplit-prs.yml @@ -0,0 +1,22 @@ +--- +name: Close sub-split PRs + +on: + schedule: + - cron: '30 7 * * *' + +jobs: + close_subsplit_prs: + runs-on: ubuntu-latest + name: Close sub-split PRs + steps: + - uses: frankdejonge/action-close-subsplit-pr@0.1.0 + with: + close_pr: 'no' + target_branch_match: '^(?!master).+$' + message: | + Hi :wave:, + + Thank you for contributing to Flysystem. Unfortunately, you've sent a PR to a read-only sub-split repository. + + All pull requests should be directed towards: https://github.com/thephpleague/flsysystem diff --git a/bin/update-subsplit-closers.php b/bin/update-subsplit-closers.php new file mode 100644 index 000000000..564165554 --- /dev/null +++ b/bin/update-subsplit-closers.php @@ -0,0 +1,19 @@ +read('config.subsplit-publish.json'), true); +$workflowContents = $filesystem->read('bin/close-subsplit-prs.yml'); + +foreach ($subsplits['sub-splits'] as ['directory' => $subsplit]) { + if ($subsplit !== 'src/AwsS3V3') { + continue; + } + + $workflowPath = $subsplit . '/.github/workflows/close-subsplit-prs.yaml'; + $filesystem->write($workflowPath, $workflowContents); +} diff --git a/src/AwsS3V3/.github/workflows/close-subsplit-prs.yaml b/src/AwsS3V3/.github/workflows/close-subsplit-prs.yaml new file mode 100644 index 000000000..2fd8d7430 --- /dev/null +++ b/src/AwsS3V3/.github/workflows/close-subsplit-prs.yaml @@ -0,0 +1,22 @@ +--- +name: Close sub-split PRs + +on: + schedule: + - cron: '30 7 * * *' + +jobs: + close_subsplit_prs: + runs-on: ubuntu-latest + name: Close sub-split PRs + steps: + - uses: frankdejonge/action-close-subsplit-pr@0.1.0 + with: + close_pr: 'no' + target_branch_match: '^(?!master).+$' + message: | + Hi :wave:, + + Thank you for contributing to Flysystem. Unfortunately, you've sent a PR to a read-only sub-split repository. + + All pull requests should be directed towards: https://github.com/thephpleague/flsysystem