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: docs/CONTRIBUTING.md
+80-2Lines changed: 80 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,8 +30,6 @@ If any tests do not pass, or relevant tests are not included, the patch will not
30
30
31
31
If you are working on a bug or feature listed in Jira, please include the ticket number prefixed with GODRIVER in the commit message and GitHub pull request title, (e.g. GODRIVER-123). For the patch commit message itself, please follow the [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/) guide.
32
32
33
-
\=======
34
-
35
33
### Linting on commit
36
34
37
35
The Go team uses [pre-commit](https://pre-commit.com/#installation) to lint both source and text files.
@@ -49,6 +47,86 @@ After that, the checks will run on any changed files when committing. To manual
49
47
pre-commit run --all-files
50
48
```
51
49
50
+
### Merge up GitHub Action
51
+
52
+
PR [#1962](https://github.com/mongodb/mongo-go-driver/pull/1962) added the "Merge up" GitHub Actions workflow to automatically roll changes from old branches into new ones. This section outlines how this process works.
53
+
54
+
#### Regression
55
+
56
+
If a regression is identified in the release/2.x branch, a fix should be submitted as a pull request targeting
57
+
release/2.x. Once this PR is merged, the "Merge up" GitHub Action will automatically create a pull request to merge
58
+
release/2.x into release/2.x+1. This process is repeated until changes are merged all the way up to release/2.latest,
59
+
which is then merged into the master branch.
60
+
61
+
For example, suppose we have four minor release branches: release/2.0, release/2.1, release/2.2, and release/2.3. If a
62
+
regression is identified in the release/2.1 branch, you would first create a pull request to fix the issue in
63
+
release/2.1. Once this pull request is merged, the "Merge up" GitHub Action automatically initiates a pull request to
64
+
merge the changes from release/2.1 into release/2.2. After that merge is completed, the action continues to create a
65
+
pull request to merge release/2.2 into release/2.3. Finally, once the changes have successfully rolled through all the
66
+
release branches, the updates in release/2.3 are prepared to be merged into the master branch, ensuring all the bug
67
+
fixes are incorporated into the latest codebase.
68
+
69
+
```mermaid
70
+
gitGraph
71
+
commit tag: "Initial main setup"
72
+
73
+
branch release/2.0
74
+
checkout release/2.0
75
+
commit tag: "Initial release/2.0"
76
+
77
+
branch release/2.1
78
+
checkout release/2.1
79
+
commit tag: "Bug introduced"
80
+
81
+
branch release/2.2
82
+
checkout release/2.2
83
+
commit tag: "Initial release/2.2"
84
+
85
+
branch release/2.3
86
+
checkout release/2.3
87
+
commit tag: "Initial release/2.3"
88
+
89
+
checkout release/2.1
90
+
commit tag: "Bug fix in release/2.1 (Manual PR)"
91
+
92
+
checkout release/2.2
93
+
merge release/2.1 tag: "Merge fix from release/2.1 (GitHub Actions)"
94
+
commit
95
+
96
+
checkout release/2.3
97
+
merge release/2.2 tag: "Merge updates from release/2.2 (GitHub Actions)"
98
+
commit
99
+
100
+
checkout main
101
+
merge release/2.3 tag: "Merge updates from release/2.3 (Github Actions)"
102
+
commit
103
+
```
104
+
105
+
#### Pull Request Management
106
+
107
+
When the "Merge up" GitHub Action is enabled, multiple merge-up pull requests (such as PR1, PR2, and PR3) can be
108
+
automatically created at the same time for different bug fixes or features that all target, for example, the
109
+
release/2.x branch. At first, PR1, PR2, and PR3 exist side by side—each handling separate changes. When PR1 and PR2 are
110
+
closed (merged), the Action automatically combines their changes into PR3. This final PR3 then contains all updates,
111
+
allowing you to merge everything into release/2.x+1 in a single, streamlined step.
112
+
113
+
```mermaid
114
+
flowchart LR
115
+
A[PR1: Merge up from release/2.x] --> B[Close PR1]
116
+
C[PR2: Merge up from release/2.x] --> D[Close PR2]
117
+
118
+
B --> E[PR3: Consolidated Final Pull Request]
119
+
D --> E
120
+
E --> F[release/2.x+1]
121
+
B[Close PR1]
122
+
D[Close PR2]
123
+
E[PR3: Includes changes from both PR1 and PR2]
124
+
```
125
+
126
+
#### Evergreen Config Merge Strategy
127
+
128
+
Changes to the testing workflow should persist through all releases in a major version.
0 commit comments