Coder Social home page Coder Social logo

aws-docs-diff's Introduction

aws-docs-diff

When sync is run, we use a uniform timestamp to threshold everything.

  • First, get all docs repos.
  • For each repo:
    • If the repo is new, clone it, write an empty file to the diffs repo and skip to the next repo. Otherwise:
    • Fetch commits (only need master).
      • This moves FETCH_HEAD, but not HEAD (HEAD stays where it was last)
    • Find the newest commit in FETCH_HEAD's history before the timestamp (could be FETCH_HEAD, or a parent).
    • If this is different from HEAD, get the diff between HEAD and that commit. Otherwise, diff is empty string.
    • Write diff to diffs repo.
  • Commit the diffs repo. Commit message and commit time are the timestamp.
  • For each repo, move HEAD to the updated commit (latest before the timestamp).

TODO:

  • How do we store more state about the diff in the diffs repo? We are relying on HEAD not getting moved in the docs repo in between syncs. Ideally the diffs repo contains all the information necessary to constitute the state for each docs repo
  • Docs repo is current git init'd if it doesn't exist. It should have an origin.
  • Should the code and diffs live in the same repo on GitHub?
  • Use dulwich to eliminate git dependency, so the code could easily be run in a Lambda

aws-docs-diff's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aws-docs-diff's Issues

Can we do this all through the GitHub API?

Maaaybe?

  • Biggest concern: little control over diff itself. No way to up the context or use a different diff format so the diffs are easier to understand.
    • It'd be cool, for example, to produce Markdown files that show the diff in two-column format
  • We want the diffs to end up in their own a GitHub repo, with all diffs generated by a single run put in the same commit. I don't see a way of doing this without a local git repo for it.
  • The existing design only uses the API to list the docs repos, which is probably few enough calls to do anonymously. Doing everything through the API would bring in OAuth complexity.

On the other hand:

  • Having GitHub forks of all the docs repos and using PRs to update them would solve the issue of managing the last position you diff'd from.
    • Even if you're cloning the docs repos locally, having a second remote that records your last diff'd position would be helpful, but the need to create those repos if they don't exist brings API auth back in.

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.