@@ -87,26 +87,36 @@ Please fix the conflicts by pushing new commits to this pull request, either by
87
87
conflictList = 'No conflicts were found.' ;
88
88
}
89
89
90
+ let tips = '' ;
91
+ if ( conflictList ) {
92
+ tips = `
93
+ We recommend to merge conflicting changes manually and close this PR.
90
94
91
- const body = `
92
- This PR was automatically generated.
93
- Merge changes from [en.javascript.info](https://github.com/${ config . org } /${ config . langMain } .${ config . repoSuffix } /commits/master) at ${ shortHash }
94
-
95
- ${ conflictList }
96
-
97
- You can also close this PR and merge the changes manually:
98
- 1. \`git add remote upstream https://github.com/javascript-tutorial/en.javascript.info\`
95
+ The steps are:
96
+ 1. Setup upstream (if haven't yet)
97
+ - \`git add remote upstream https://github.com/javascript-tutorial/en.javascript.info\`
99
98
2. Commit all current work and \`git checkout master\`
100
- 3. Pull from the English version \`git pull upstream master\`
101
- 4. Deal with the conflicts. If there are many changes in a file, e.g. \`README.md\`, then you could:
99
+ 3. Pull the recent changes from the English version:
100
+ - \`git pull upstream master\`
101
+ 4. Deal with the conflicts. If a conflict touches a few lines, then just fix them. Otherwise, if there are many changes, you can see them like this:
102
102
- Checkout your version, \`git checkout --ours README.md\`
103
103
- See what changed in the original file:
104
- - \`git diff --word-diff master...upstream/master README.md\` (three dots)
105
- - Update your version
106
- - \`git commit -m synced README.md\`
104
+ - \`git diff --word-diff master...upstream/master README.md\` (please note: three dots in the command )
105
+ - Re-translate or otherwise sync the translated version and commit it:
106
+ - \`git commit -m synced README.md\`
107
107
5. When conflicts resolved, \`git push origin master\`
108
108
109
109
P.S. **Don't squash and merge** if GitHub offers you, as this leads to same conflicts re-appear in the future.
110
+ ` ;
111
+ }
112
+
113
+ const body = `
114
+ This PR was automatically generated.
115
+ Merge changes from [en.javascript.info](https://github.com/${ config . org } /${ config . langMain } .${ config . repoSuffix } /commits/master) at ${ shortHash }
116
+
117
+ ${ conflictList }
118
+
119
+ ${ tips }
110
120
` ;
111
121
112
122
try {
0 commit comments