Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: DjangoGirls/tutorial
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: ekohl/tutorial
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: generate-pr-preview-v2
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 1,598 files changed
  • 1 contributor

Commits on Jan 17, 2025

  1. Implement previews for GitHub pull requests

    When a contributor submits a PR, we always perform a build. This takes
    it a step further and uploads that a custom surge.sh domain. It adds a
    sticky comment to link to that preview while also generating some diffs.
    This means reviews easier.
    
    In the implementation an additional preview step is added. This first
    builds the base (target of the PR) as the current. Then it downloads the
    generated preview that was added as an artifact in the original build
    step. Creating a reasonably sized diff was tricky, because there's a
    long Javascript line that includes the mtime, making it indeterministic.
    That line isn't relevant anyway, so it's removed. The diff command also
    ignores the search index.
    
    All of that is placed in the preview, making it readable. A sticky
    comment is added with a summary, making it easy to use. The sticky
    comment is updated for every push, rather than added a comment for every
    push. This keeps the PR conversation usable.
    ekohl committed Jan 17, 2025
    Configuration menu
    Copy the full SHA
    22a116e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5b66051 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    458b681 View commit details
    Browse the repository at this point in the history
Loading