File: update-subsplit-closers.php

package info (click to toggle)
php-league-flysystem 3.29.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,316 kB
  • sloc: php: 14,623; makefile: 48; sh: 31
file content (15 lines) | stat: -rw-r--r-- 582 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

use League\Flysystem\Filesystem;
use League\Flysystem\Local\LocalFilesystemAdapter;

include __DIR__ . '/../vendor/autoload.php';

$filesystem = new Filesystem(new LocalFilesystemAdapter(realpath(__DIR__ . '/../')));
$subsplits = json_decode($filesystem->read('config.subsplit-publish.json'), true);
$workflowContents = $filesystem->read('bin/close-subsplit-prs.yml');

foreach ($subsplits['sub-splits'] as ['directory' => $subsplit]) {
    $workflowPath = $subsplit . '/.github/workflows/close-subsplit-prs.yaml';
    $filesystem->write($workflowPath, $workflowContents);
}