Commit fcfc225 1 parent b2056e6 commit fcfc225 Copy full SHA for fcfc225
File tree 1 file changed +11
-5
lines changed
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -26,18 +26,24 @@ const throwIfIsMaster = (workspace: string) => {
26
26
}
27
27
}
28
28
29
+ /* This function is very specific to solve conflicts in the pages graphql app.
30
+ The primary conflict resolution strategy at the file level
31
+ is insufficient for safely resolving conflicts in the pages GraphQL application.
32
+ All conflicts resolved here is using a mineWins strategy at the content json level.
33
+ */
29
34
const handleConflict = async ( ) => {
30
- const conflictsFound = await vbase . checkForConflicts ( )
35
+ const conflictsFoundForPagesGraphql = await vbase . checkForConflicts ( )
31
36
32
- if ( conflictsFound ) {
33
- await axios . get ( workspaceUrl )
34
- }
37
+ if ( ! conflictsFoundForPagesGraphql ) return
38
+
39
+ // Forcing rebase to avoid conflicts
40
+ await axios . get ( workspaceUrl )
35
41
36
42
// @vtex /api expects a full implementation of the client, so we need to cast it to any.
37
43
// The partial implementation is enough to solve conflicts.
38
44
const conflictsResolver = new MineWinsConflictsResolver ( ( vbase as Partial < VBase > ) as any , 'userData' , '' )
39
45
40
- await conflictsResolver . resolveAll ( )
46
+ return conflictsResolver . resolveAll ( )
41
47
}
42
48
43
49
const isPromotable = async ( workspace : string ) => {
You can’t perform that action at this time.
0 commit comments