Skip to content

Commit 71f97cc

Browse files
committed
chore: prepare repository for public release and add branch rulesets
Summary of changes: - Removed hardcoded private IPs from nginx_example.conf and launch.json. - Added CONTRIBUTING.md policy to restrict unsolicited Pull Requests. - Created PULL_REQUEST_TEMPLATE.md for contributor validation. - Generated GitHub Ruleset JSON files (ruleset_main.json, ruleset_push_limits.json) for branch protection. - Updated README.md with contributing notice.
1 parent d9a3fa7 commit 71f97cc

7 files changed

Lines changed: 125 additions & 9 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!--
2+
🛑 STOP 🛑
3+
4+
By submitting this pull request, you confirm that you are an APPROVED collaborator on this project.
5+
Unsolicited Pull Requests from unauthorized users will be automatically closed without review.
6+
For more information, please read the CONTRIBUTING.md file.
7+
-->
8+
9+
## Description
10+
<!-- Briefly describe your changes. -->
11+
12+
## Related Issues
13+
<!-- Link any related issues here. -->
14+
15+
## Contributor Approval
16+
- [ ] I confirm I am an approved collaborator for this repository.

.github/ruleset_main.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"name": "Strict Main Branch Protection",
3+
"target": "branch",
4+
"enforcement": "active",
5+
"bypass_actors": [
6+
{
7+
"actor_id": 5,
8+
"actor_type": "RepositoryRole",
9+
"bypass_mode": "always"
10+
}
11+
],
12+
"conditions": {
13+
"ref_name": {
14+
"exclude": [],
15+
"include": [
16+
"~DEFAULT_BRANCH"
17+
]
18+
}
19+
},
20+
"rules": [
21+
{
22+
"type": "deletion"
23+
},
24+
{
25+
"type": "non_fast_forward"
26+
},
27+
{
28+
"type": "pull_request",
29+
"parameters": {
30+
"dismiss_stale_reviews_on_push": true,
31+
"require_code_owner_review": false,
32+
"require_last_push_approval": true,
33+
"required_approving_review_count": 1,
34+
"required_review_thread_resolution": true
35+
}
36+
},
37+
{
38+
"type": "required_status_checks",
39+
"parameters": {
40+
"strict_required_status_checks_policy": true,
41+
"required_status_checks": [
42+
{
43+
"context": "flutter_tests",
44+
"integration_id": 15368
45+
},
46+
{
47+
"context": "go_tests",
48+
"integration_id": 15368
49+
}
50+
]
51+
}
52+
}
53+
]
54+
}

.github/ruleset_push_limits.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "Limit large pushes & strict email via Push Rules",
3+
"target": "push",
4+
"enforcement": "active",
5+
"bypass_actors": [
6+
{
7+
"actor_id": 5,
8+
"actor_type": "RepositoryRole",
9+
"bypass_mode": "always"
10+
}
11+
],
12+
"conditions": {},
13+
"rules": [
14+
{
15+
"type": "commit_author_email_pattern",
16+
"parameters": {
17+
"operator": "ends_with",
18+
"pattern": "@users.noreply.github.com"
19+
}
20+
},
21+
{
22+
"type": "file_path_length",
23+
"parameters": {
24+
"max_file_path_length": 256
25+
}
26+
}
27+
]
28+
}

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"id": "androidDeviceId",
5858
"type": "promptString",
5959
"description": "Android device IP:port — press Enter to reuse, or type a new address to change the default",
60-
"default": "10.10.0.109:39509"
60+
"default": "192.168.1.xxx:5555"
6161
}
6262
]
6363
}

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Contributing
2+
3+
**Please read before submitting a Pull Request!**
4+
5+
This project is currently developed as a closed contribution repository. While the source code is public for educational purposes and transparency, we do **not** accept unsolicited Pull Requests at this time.
6+
7+
## Policy
8+
9+
- **Only pre-approved collaborators** are allowed to submit Pull Requests.
10+
- Unapproved Pull Requests will be automatically flagged and **closed without review**.
11+
- If you would like to report a bug or request a feature, please do so by creating an **Issue** rather than a Pull Request.
12+
13+
Thank you for your understanding and for taking the time to explore this project!

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,8 @@ dart analyze lib
150150
(warning: deletes all data).
151151
- **Linux build errors:** Use manually installed Flutter (not Snap).
152152
Install: `sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev`
153+
154+
## Contributing
155+
156+
Currently, this repository is open for public viewing and learning, but **closed to public contributions**. Only selected and approved contributors may submit Pull Requests. Please see the [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
157+

nginx_example.conf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ server {
3838

3939
# --- Synapse Client-Server + Federation API ---
4040
location /_matrix/ {
41-
proxy_pass http://10.10.0.52:8008;
41+
proxy_pass http://127.0.0.1:8008;
4242
proxy_set_header Host $host;
4343
proxy_set_header X-Real-IP $remote_addr;
4444
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -51,7 +51,7 @@ server {
5151

5252
# --- Synapse Sync endpoint (long-polling, needs long timeout) ---
5353
location /_matrix/client/v3/sync {
54-
proxy_pass http://10.10.0.52:8008;
54+
proxy_pass http://127.0.0.1:8008;
5555
proxy_set_header Host $host;
5656
proxy_set_header X-Real-IP $remote_addr;
5757
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -62,7 +62,7 @@ server {
6262

6363
# --- Synapse Media API ---
6464
location /_matrix/media/ {
65-
proxy_pass http://10.10.0.52:8008;
65+
proxy_pass http://127.0.0.1:8008;
6666
proxy_set_header Host $host;
6767
proxy_set_header X-Real-IP $remote_addr;
6868
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -72,7 +72,7 @@ server {
7272

7373
# --- Concord Application Service API (invite codes, LiveKit tokens) ---
7474
location /api/ {
75-
proxy_pass http://10.10.0.52:3000;
75+
proxy_pass http://127.0.0.1:3000;
7676
proxy_set_header Host $host;
7777
proxy_set_header X-Real-IP $remote_addr;
7878
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -81,7 +81,7 @@ server {
8181

8282
# --- Element Call (web-based group calls) ---
8383
location /call/ {
84-
proxy_pass http://10.10.0.52:8090/;
84+
proxy_pass http://127.0.0.1:8090/;
8585
proxy_set_header Host $host;
8686
proxy_set_header X-Real-IP $remote_addr;
8787
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -103,7 +103,7 @@ server {
103103
server_tokens off;
104104

105105
location / {
106-
proxy_pass http://10.10.0.52:8008;
106+
proxy_pass http://127.0.0.1:8008;
107107
proxy_set_header Host $host;
108108
proxy_set_header X-Real-IP $remote_addr;
109109
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -128,7 +128,7 @@ server {
128128
add_header X-Content-Type-Options "nosniff" always;
129129

130130
location / {
131-
proxy_pass http://10.10.0.52:7880;
131+
proxy_pass http://127.0.0.1:7880;
132132
proxy_set_header Host $host;
133133
proxy_set_header X-Real-IP $remote_addr;
134134
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -158,7 +158,7 @@ server {
158158
allow 10.10.0.0/24;
159159
deny all;
160160

161-
proxy_pass http://10.10.0.52:9001;
161+
proxy_pass http://127.0.0.1:9001;
162162
proxy_set_header Host $host;
163163
proxy_set_header X-Real-IP $remote_addr;
164164
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

0 commit comments

Comments
 (0)