From 1e9ca1099a007b51f94a5be41c7108752846a8f7 Mon Sep 17 00:00:00 2001 From: Frank de Jonge Date: Sun, 3 Jul 2022 12:43:23 +0200 Subject: [PATCH] Test sub-split closer on AwsS3V3 --- bin/close-subsplit-prs.yml | 22 +++++++++++++++++++ bin/update-subsplit-closers.php | 19 ++++++++++++++++ .../.github/workflows/close-subsplit-prs.yaml | 22 +++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 bin/close-subsplit-prs.yml create mode 100644 bin/update-subsplit-closers.php create mode 100644 src/AwsS3V3/.github/workflows/close-subsplit-prs.yaml 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