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
-[Rush commands take too long, is there a way to speed up my contribution workflow?](#rush-commands-take-too-long-is-there-a-way-to-speed-up-my-contribution-workflow)
@@ -105,6 +106,7 @@ Add a `.only` to a `describe()` or `it()` test function. Afterwards, run the cus
To distinguish whether a package is using vitest or mocha, look at the `package.json``devDependencies`.
146
+
143
147
## Asking Questions
144
148
145
149
Have a question?
@@ -205,7 +209,7 @@ There are just a few guidelines you need to follow.
205
209
206
210
### Branch Naming Policy
207
211
208
-
We recommend putting your github username, followed by a succinct branch name that reflects the changes you want to make. Eg. `git checkout -b "<gh_username>/cleanup-docs"`
212
+
We recommend putting your github username, followed by a succinct branch name that reflects the changes you want to make. Eg. `git checkout -b "<gh_username>/cleanup-docs"`
209
213
210
214
Branch names should be all lowercase to avoid potential issues with non-case-sensitive systems and words should be separated by a dash. Eg: `my-itwin-changes`
211
215
@@ -220,6 +224,29 @@ All submissions go through a review process.
220
224
We use GitHub pull requests for this purpose.
221
225
Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using pull requests.
222
226
227
+
#### Backporting to Release Branches
228
+
229
+
When bug fixes or critical changes need to be applied to release branches (e.g., `release/5.1.x`), follow these best practices for backporting:
230
+
231
+
**Best Practices:**
232
+
233
+
-**Master First Approach**: Changes should always go into `master` first, then be backported to release branches if required for future releases. Avoid backporting from release branches to `master` whenever possible to maintain clean commit history and reduce conflicts
234
+
-**PR Naming Convention**: Always wrap the target branch name in square brackets in your PR title
235
+
- Example: `[release/5.1.x] Fix critical bug in geometry calculations`
236
+
-**Use @Mergifyio**: For backporting PRs from `master` to release branches, we recommend using `@Mergifyio` to automate the process
237
+
- Comment `@Mergifyio backport release/X.X.x` on the original PR to create an automatic backport. Use the release branch you want to target
238
+
- Note: `@Mergifyio` automatically cherry-picks commits, but may encounter merge conflicts. If conflicts occur, you must resolve them manually and then remove the `conflicts` label from your PR to proceed
239
+
-**Cherry-pick Carefully**: When manually backporting, ensure all dependencies and related changes are included
240
+
-**Minimal Changes**: Keep backports focused and avoid unnecessary refactoring or feature additions
241
+
242
+
**Example Workflow:**
243
+
244
+
1. Identify the commits that need to be backported from `master`
245
+
2. Create a new branch from the target release branch (e.g., `release/5.1.x`)
246
+
3. Cherry-pick or manually apply the necessary changes
247
+
4. Create a PR with the branch name in square brackets in the title
248
+
5. Ensure all tests pass and the change is compatible with the release version
249
+
223
250
### Types of Contributions
224
251
225
252
We welcome contributions, large or small, including:
@@ -243,16 +270,19 @@ If your source code change only impacts the subdirectory you are working on, you
243
270
Eg. I add a new method within `core/frontend`, also adding a relevant unit test in that folder's `src/test`. I can navigate to the root of that subdirectory, and run `rushx build`, followed by `rushx test` or `rushx cover`.
244
271
245
272
### Do I have to rebuild all packages in the repo, even those I didn't work on?
273
+
246
274
No. For incremental builds, the `rush build` command can be used to only build packages that have changes versus `rush rebuild` which always rebuilds all packages.
247
275
248
276
> It is a good idea to `rush install` after each `git pull` as dependencies may have changed.
249
-
>
277
+
250
278
### A subdirectory can not find a node_modules file or directory
279
+
251
280
If you get an error similar to the following:
252
281
253
-
```
282
+
```bash
254
283
[Error: ENOENT: no such file or directory, stat '/.../itwinjs-core/test-apps/display-test-app/node_modules/@bentley/react-scripts']
255
284
```
285
+
256
286
This means that the repo has stopped making use of an npm package that was used in the past:
257
287
258
288
To fix this build error, you should completely remove the node_modules directory and reinstall your dependencies. `rush update --purge` is a one-line solution for the above.
0 commit comments