Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically resolve conflicts in yarn.lock #136

Closed
spalger opened this issue Jun 7, 2019 · 3 comments
Closed

Automatically resolve conflicts in yarn.lock #136

spalger opened this issue Jun 7, 2019 · 3 comments

Comments

@spalger
Copy link
Contributor

spalger commented Jun 7, 2019

It could be nice if backport automatically handled conflicts in yarn.lock files by running yarn (or a custom command like yarn kbn bootstrap) and then git commit --no-edit when it exits successfully.

@sorenlouv
Copy link
Owner

sorenlouv commented Sep 4, 2019

backport being a useful tool outside the realm of javascript I'm hesitant to implement something language specific like this.

For a while I've been thinking about changing the project config (.backportrc.json) from json to js. This would allow users to implement pre- and post-backport hooks.

Something like this could then be implemented:

module.exports = {
  upstream: 'elastic/kibana',
  onConflict: async (files) => {
    if(files.includes('yarn.lock')) {
      return exec('yarn kbn bootstrap');
    }
  }
}

What do you think?

@spalger
Copy link
Contributor Author

spalger commented Sep 4, 2019

I'm not opposed, but would only want to handle automatic conflict resolution when the files were exactly just yarn.lock, but that happens less and less these days (in my experience) so I don't see it as particularly valuable.

@sorenlouv
Copy link
Owner

but that happens less and less these days (in my experience) so I don't see it as particularly valuable.

In that case, do you think this issue should be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants