Skip to content

Commit f57d330

Browse files
Merge branch '5.4' into 6.4
* 5.4: Add PR template and auto-close PR on subtree split repositories
2 parents 33050e3 + dcb690a commit f57d330

File tree

472 files changed

+4949
-242
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

472 files changed

+4949
-242
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
/src/Symfony/Component/Runtime export-ignore
77
/src/Symfony/Component/Translation/Bridge export-ignore
88
/src/Symfony/Component/Intl/Resources/data/*/* linguist-generated=true
9+
/src/Symfony/**/.github/workflows/close-pull-request.yml linguist-generated=true
10+
/src/Symfony/**/.github/PULL_REQUEST_TEMPLATE.md linguist-generated=true

.github/sync-packages.php

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?php
2+
3+
if ('cli' !== PHP_SAPI) {
4+
echo "This script can only be run from the command line.\n";
5+
exit(1);
6+
}
7+
8+
$mainRepo = 'https://github.com/symfony/symfony';
9+
exec('find src -name composer.json', $packages);
10+
11+
foreach ($packages as $package) {
12+
$package = dirname($package);
13+
$c = file_get_contents($package.'/.gitattributes');
14+
$c = preg_replace('{^/\.git.*+\n}m', '', $c);
15+
$c .= "/.git* export-ignore\n";
16+
file_put_contents($package.'/.gitattributes', $c);
17+
18+
@mkdir($package.'/.github');
19+
file_put_contents($package.'/.github/PULL_REQUEST_TEMPLATE.md', <<<EOTXT
20+
Please do not submit any Pull Requests here. They will be closed.
21+
---
22+
23+
Please submit your PR here instead:
24+
{$mainRepo}
25+
26+
This repository is what we call a "subtree split": a read-only subset of that main repository.
27+
We're looking forward to your PR there!
28+
29+
EOTXT
30+
);
31+
32+
@mkdir($package.'/.github/workflows');
33+
file_put_contents($package.'/.github/workflows/close-pull-request.yml', <<<EOTXT
34+
name: Close Pull Request
35+
36+
on:
37+
pull_request_target:
38+
types: [opened]
39+
40+
jobs:
41+
run:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: superbrothers/close-pull-request@v3
45+
with:
46+
comment: |
47+
Thanks for your Pull Request! We love contributions.
48+
49+
However, you should instead open your PR on the main repository:
50+
{$mainRepo}
51+
52+
This repository is what we call a "subtree split": a read-only subset of that main repository.
53+
We're looking forward to your PR there!
54+
55+
EOTXT
56+
);
57+
}
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
/Tests export-ignore
22
/phpunit.xml.dist export-ignore
3-
/.gitattributes export-ignore
4-
/.gitignore export-ignore
3+
/.git* export-ignore

src/Symfony/Bridge/Doctrine/.github/PULL_REQUEST_TEMPLATE.md

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Symfony/Bridge/Doctrine/.github/workflows/close-pull-request.yml

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
/Tests export-ignore
22
/phpunit.xml.dist export-ignore
3-
/.gitattributes export-ignore
4-
/.gitignore export-ignore
3+
/.git* export-ignore

src/Symfony/Bridge/Monolog/.github/PULL_REQUEST_TEMPLATE.md

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Symfony/Bridge/Monolog/.github/workflows/close-pull-request.yml

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
/Tests export-ignore
22
/phpunit.xml.dist export-ignore
3-
/.gitattributes export-ignore
4-
/.gitignore export-ignore
3+
/.git* export-ignore

src/Symfony/Bridge/PhpUnit/.github/PULL_REQUEST_TEMPLATE.md

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Symfony/Bridge/PhpUnit/.github/workflows/close-pull-request.yml

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
/Tests export-ignore
22
/phpunit.xml.dist export-ignore
3-
/.gitattributes export-ignore
4-
/.gitignore export-ignore
3+
/.git* export-ignore

src/Symfony/Bridge/ProxyManager/.github/PULL_REQUEST_TEMPLATE.md

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Symfony/Bridge/ProxyManager/.github/workflows/close-pull-request.yml

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Symfony/Bridge/PsrHttpMessage/.github/PULL_REQUEST_TEMPLATE.md

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Symfony/Bridge/PsrHttpMessage/.github/workflows/close-pull-request.yml

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
/Tests export-ignore
22
/phpunit.xml.dist export-ignore
3-
/.gitattributes export-ignore
4-
/.gitignore export-ignore
3+
/.git* export-ignore

src/Symfony/Bridge/Twig/.github/PULL_REQUEST_TEMPLATE.md

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Symfony/Bridge/Twig/.github/workflows/close-pull-request.yml

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
/Tests export-ignore
22
/phpunit.xml.dist export-ignore
3-
/.gitattributes export-ignore
4-
/.gitignore export-ignore
3+
/.git* export-ignore

src/Symfony/Bundle/DebugBundle/.github/PULL_REQUEST_TEMPLATE.md

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Symfony/Bundle/DebugBundle/.github/workflows/close-pull-request.yml

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
/Tests export-ignore
22
/phpunit.xml.dist export-ignore
3-
/.gitattributes export-ignore
4-
/.gitignore export-ignore
3+
/.git* export-ignore

src/Symfony/Bundle/FrameworkBundle/.github/PULL_REQUEST_TEMPLATE.md

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Symfony/Bundle/FrameworkBundle/.github/workflows/close-pull-request.yml

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
/Tests export-ignore
22
/phpunit.xml.dist export-ignore
3-
/.gitattributes export-ignore
4-
/.gitignore export-ignore
3+
/.git* export-ignore

src/Symfony/Bundle/SecurityBundle/.github/PULL_REQUEST_TEMPLATE.md

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Symfony/Bundle/SecurityBundle/.github/workflows/close-pull-request.yml

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
/Tests export-ignore
22
/phpunit.xml.dist export-ignore
3-
/.gitattributes export-ignore
4-
/.gitignore export-ignore
3+
/.git* export-ignore

src/Symfony/Bundle/TwigBundle/.github/PULL_REQUEST_TEMPLATE.md

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)