Open Game Sync pull requests as drafts

The case: your writers fix lines all day, and Game Sync runs every hour. Each run updates the Leviathan pull request, and each update starts your game's full build on GitHub Actions. You only want that build when the story is ready to go into the game.

The short answer: in the game's Game Sync settings, under Repository, switch on Open pull requests as drafts. New sync pull requests open as drafts, and checks that skip drafts wait until you press Ready for review on GitHub.

The Repository section of the Game Sync settings: Base branch set to main, and Open pull requests as drafts switched on

1. Open the game's sync settings

  1. Open your world's Integrations page.
  2. Under Game Sync, click Edit on the game (or Set up sync if it doesn't sync yet).

2. Switch on drafts

  1. Under Repository, below Base branch, switch on Open pull requests as drafts.
  2. Click Save.

The summary at the bottom of the dialog now says LoreHub will open a draft pull request into your base branch.

The summary: LoreHub will write the dialogues to lorehub/ on branch lorehub/leviathan and open a draft pull request into main

3. Skip the build on drafts

GitHub runs checks on draft pull requests unless a workflow says not to. In the workflow that builds your game, skip drafts and run again when the pull request is marked ready:

on:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]

jobs:
  build:
    if: github.event.pull_request.draft == false

Test it

  1. Press Sync now on the game.
  2. Open the pull request LoreHub opens in your repository. GitHub shows it as a Draft, and the build doesn't run.
  3. Press Ready for review on GitHub. The build runs, and you merge as usual.

Good to know

  • Only new pull requests. While a sync pull request is open, later syncs add commits to it and never change whether it's a draft. Switching the option on or off takes effect with the next pull request LoreHub opens, after the current one is merged or closed.
  • Ready stays ready. Once you mark a sync pull request ready for review, later syncs leave it that way.
  • No drafts on the repository's plan. Some GitHub plans don't allow draft pull requests in private repositories. There, LoreHub opens a normal pull request instead, so the sync still works.

Variations

Choose what goes in the files. See Choose which documents Game Sync sends to your game.

In your game

Nothing changes in the files: a draft pull request carries the same dialogue files as a normal one. Merge it into your base branch when it's ready, and your game reads the files from the Game Sync folder as before.

Did this answer your question?

More in Export and game engines