You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+83Lines changed: 83 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,89 @@ Unsure where to start? Look for issues tagged with `good first issue`—these ar
37
37
-**Testing**: Adding tests for new features or fixing bugs increases the stability of Omniview. We love tests!
38
38
-**Documentation**: If your changes need documentation, please update it. Good documentation is key to user adoption.
39
39
40
+
## Working with Forks and Submodules
41
+
42
+
Omniview uses Git submodules for first-party plugins (e.g. `plugins/kubernetes`). If you're developing across a fork of the parent repo **and** a fork of a plugin, follow this workflow carefully to avoid polluting PRs with submodule URL changes.
After cloning your fork of the parent repo, the submodule will point to the canonical upstream URL (as defined in `.gitmodules`). Add your plugin fork as a second remote inside the submodule so you can push feature branches there:
This writes only to your local `.git/config` and is never committed.
71
+
72
+
### Developing a plugin change
73
+
74
+
1. Branch off your plugin fork, do your work, push to your fork, open a PR to `omniviewdev/omniview-plugin-kubernetes`.
75
+
2. While waiting for the plugin PR to merge you can point your local submodule at your feature branch commit for integration testing — but **never commit a `.gitmodules` change** that points to a personal fork.
76
+
3. Once the plugin PR is merged, advance the submodule pointer in the parent repo:
77
+
78
+
```bash
79
+
cd plugins/kubernetes
80
+
git fetch upstream
81
+
git checkout upstream/main
82
+
83
+
cd ..
84
+
git add plugins/kubernetes
85
+
git commit -m "chore: update kubernetes submodule to upstream main (<short-sha>)"
86
+
```
87
+
88
+
4. Open a PR to `omniviewdev/omniview` with just the submodule pointer bump.
89
+
90
+
### Syncing your fork after upstream merges
91
+
92
+
After any PR is merged into the upstream parent repo, sync your fork's `main`:
93
+
94
+
```bash
95
+
git fetch upstream
96
+
git merge upstream/main
97
+
git push origin main
98
+
```
99
+
100
+
Then check the submodule too — if `git submodule status` shows a `-` or `+` prefix the pointer is out of sync:
101
+
102
+
```bash
103
+
cd plugins/kubernetes
104
+
git fetch upstream
105
+
git checkout upstream/main
106
+
107
+
cd ..
108
+
git add plugins/kubernetes
109
+
git commit -m "chore: update kubernetes submodule to upstream main (<short-sha>)"
110
+
git push origin main
111
+
```
112
+
113
+
### The rule that prevents collisions
114
+
115
+
> **`.gitmodules` must always reference the canonical upstream URL.** Never open a PR that changes a submodule URL to a personal fork. Use `git config submodule.<path>.url` for local overrides — these live in `.git/config` and are never committed.
116
+
117
+
To reset a local override back to the canonical URL at any time:
118
+
119
+
```bash
120
+
git submodule sync
121
+
```
122
+
40
123
## Signing the CLA
41
124
42
125
Before we can accept your contributions, you'll need to sign a Contributor License Agreement (CLA). This helps ensure that the community can always use your contributions.
0 commit comments