Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d90fa7a

Browse filesBrowse files
GromNaNnicolas-grekas
authored andcommitted
Add PR template and auto-close PR on subtree split repositories
1 parent b6a5496 commit d90fa7a
Copy full SHA for d90fa7a

File tree

Expand file treeCollapse file tree

389 files changed

+3800
-244
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

389 files changed

+3800
-244
lines changed

‎.gitattributes

Copy file name to clipboardExpand all lines: .gitattributes
+2Lines changed: 2 additions & 0 deletions
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

Copy file name to clipboard
+57Lines changed: 57 additions & 0 deletions
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-2Lines changed: 1 addition & 2 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/.github/PULL_REQUEST_TEMPLATE.md
+8Lines changed: 8 additions & 0 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/.github/workflows/close-pull-request.yml
+20Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+1-2Lines changed: 1 addition & 2 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Monolog/.github/PULL_REQUEST_TEMPLATE.md
+8Lines changed: 8 additions & 0 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Monolog/.github/workflows/close-pull-request.yml
+20Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+1-2Lines changed: 1 addition & 2 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/.github/PULL_REQUEST_TEMPLATE.md
+8Lines changed: 8 additions & 0 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/.github/workflows/close-pull-request.yml
+20Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+1-2Lines changed: 1 addition & 2 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/ProxyManager/.github/PULL_REQUEST_TEMPLATE.md
+8Lines changed: 8 additions & 0 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/ProxyManager/.github/workflows/close-pull-request.yml
+20Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+1-2Lines changed: 1 addition & 2 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/.github/PULL_REQUEST_TEMPLATE.md
+8Lines changed: 8 additions & 0 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/.github/workflows/close-pull-request.yml
+20Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+1-2Lines changed: 1 addition & 2 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DebugBundle/.github/PULL_REQUEST_TEMPLATE.md
+8Lines changed: 8 additions & 0 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DebugBundle/.github/workflows/close-pull-request.yml
+20Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+1-2Lines changed: 1 addition & 2 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/.github/PULL_REQUEST_TEMPLATE.md
+8Lines changed: 8 additions & 0 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/.github/workflows/close-pull-request.yml
+20Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+1-2Lines changed: 1 addition & 2 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/.github/PULL_REQUEST_TEMPLATE.md
+8Lines changed: 8 additions & 0 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/.github/workflows/close-pull-request.yml
+20Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+1-2Lines changed: 1 addition & 2 deletions
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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/.github/PULL_REQUEST_TEMPLATE.md
+8Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/.github/workflows/close-pull-request.yml
+20Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+1-2Lines changed: 1 addition & 2 deletions
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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.