File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,28 @@ async function main() {
92
92
baseBranch = defaultBaseBranch ;
93
93
}
94
94
95
+ /**
96
+ * The provided base branch needs to be fetched.
97
+ * This ensures that the local base branch is up-to-date with the
98
+ * remote base branch. Otherwise, there might be errors stating that
99
+ * certain files don't exist in the local base branch.
100
+ */
101
+ const fetchBaseBranch = spinner ( ) ;
102
+
103
+ // Inform the user that the base branch is being fetched.
104
+ fetchBaseBranch . start ( `Fetching "${ baseBranch } " to have the latest changes` ) ;
105
+
106
+ // Fetch the base branch.
107
+ await execAsync ( `git fetch origin ${ baseBranch } ` ) . catch ( ( error ) => {
108
+ fetchBaseBranch . stop ( `Failed to fetch "${ baseBranch } "` ) ;
109
+ console . error ( error ) ;
110
+ return process . exit ( 0 ) ;
111
+ } ) ;
112
+
113
+ // Inform the user that the base branch has been fetched.
114
+ fetchBaseBranch . stop ( `Fetched "${ baseBranch } "` ) ;
115
+
116
+
95
117
const updateGroundTruth = spinner ( ) ;
96
118
97
119
// Inform the user that the local ground truths are being updated.
You can’t perform that action at this time.
0 commit comments