Giter Site home page Giter Site logo

Import Bot? about fbshipit HOT 5 CLOSED

facebook avatar facebook commented on April 28, 2024
Import Bot?

from fbshipit.

Comments (5)

sdwilsh avatar sdwilsh commented on April 28, 2024 2

Commits that have already landed:

from fbshipit.

fredemmott avatar fredemmott commented on April 28, 2024
  1. At the moment, it's an entirely separate system, though we'd like to change this.
  2. Some projects explicitly list the files, though the most common approach is probably manually applying these patches.

from fbshipit.

chrisui avatar chrisui commented on April 28, 2024

I too am exploring how we can use fbshipit to sync internal projects from our private monorepo to public open source repos. (It seems a bit odd to have such a one-way tool atm but maybe I'm missing the point!)

I was wondering if, since fbshipit seems to have first-class support for writing to git & github, both of my repos live within github (they do - one private, the other public) I could theoretically have two shipit scripts which independently sync each way?

Would fbshipit be able to detect the, potentially interleaving changes? We could even avoid that problem by always running both scripts together (in some "sync" event) so on each side you collect changes since last sync and then apply diff in each direction.

@fredemmott @skevy

from fbshipit.

fredemmott avatar fredemmott commented on April 28, 2024

ShipIt does not support two-way sync, and it's not something we're particularly likely to work on; a single source of truth simplifies a huge number of problems.

That said, if you make it possible to change the tracking line added to commit messages and use a different one for each direction, skip if one's already present for the direction you're already going in, it will basically work - but it would probably be extremely time-consuming to debug and fix if the sync breaks in one direction only at some point and you keep pushing out patches in the other.

That said, it would be reasonable to use this approach if pull requests are merged to the internal repo instead of trying to have a true two-way-sync, i.e:

screen shot 2016-09-01 at 10 41 37 am

Pull requests could either be directly pushed by shipit to your internal repo (assuming it's Git or you send a PR for #1 :p):

  • have new shipit script with github as source, internal repo as dest
  • run shipit with --source-branch=pull/PR_NUMBER/head (https://help.github.com/articles/checking-out-pull-requests-locally/) and either:
    • do the differing identifier lines mentioned above
    • run with --skip-push, and with some other script, export the patch, amend it to remove the identifier, and land to your internal repo as normally
  • you'll want your filter function, an additional phase, or a separate script to add 'fixes #nnnn' to the commit message so that github closes the PR when it lands

from fbshipit.

sdwilsh avatar sdwilsh commented on April 28, 2024

I'm actively working on this internally as we speak. Expect the bulk of the code to land today or tomorrow.

from fbshipit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.