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
In the Kibana repo specifically there are a handful of files which regularly experience conflicts that could be fixed automatically if we knew that conflicts were limited to a specific set of files. I wonder if we could define a module which would be loaded to inspect the conflicting files to decide if the conflicts could be fixed automatically?
Something like this perhaps?
require('backport').run({asyncautoFixConflicts(files,directory,log){constcandidates=['yarn.lock','packages/kbn-pm/dist/index.js']constnoCandidates=files.every(f=>!candidates.includes(f))if(noCandidates){log.info('conflicts are not in auto fixable files')returnfalse;}constnonCandidates=files.filter(f=>!candidates.includes(f))if(nonCandidates.length){log.info('unable to auto fix conflicts because of changes in',nonCandidates.join(', '))returnfalse;}awaitexeca('git',['checkout','--', ...files],{cwd: directory})log.info('bootstrapping backport repo')awaitexeca('yarn',['kbn','bootstrap'],{cwd: directory})if(files.includes('packages/kbn-pm/dist/index.js')){log.info('auto fixing kbn/pm dist')awaitexeca('yarn',['kbn','run','build','-i','@kbn/pm'],{cwd: directory})}returntrue;}})
The text was updated successfully, but these errors were encountered:
We could definitely do something like that. I've been considering converting the .backportrc.json config to a javascript file (.backportrc.js) to support dynamic stuff like this.
In the Kibana repo specifically there are a handful of files which regularly experience conflicts that could be fixed automatically if we knew that conflicts were limited to a specific set of files. I wonder if we could define a module which would be loaded to inspect the conflicting files to decide if the conflicts could be fixed automatically?
Something like this perhaps?
The text was updated successfully, but these errors were encountered: