Manual 0.8.0

Write approved stories to GitHub

Point an approved draft at a GitHub repository, so approving a draft creates an issue there, and shipping closes it and leaves a delivery note on it. The read connector and the write adapter share one [connectors.github] table.

Before you start

Configuration page

  1. Open the configuration page. If it is not open, run revetly config and open the address it prints.

  2. On the project's card, select Show 5 more.

    You should see Approved item store on the project's card.

  3. Choose GitHub board in Approved item store.

  4. Select Save.

  5. Read the checks from step 2 under the command line below. Revetly runs the doctor's checks and the rehearsal there, and the page runs neither.

Command line

  1. In revetly.toml at the project root, name GitHub as the approved item store:

    # revetly.toml
    [backend]
    pbi = "github"
    

    Revetly refuses a label the repository lacks rather than creating it, so the draft, in-progress and parked labels the status map names must already exist, and a label: type label is refused when the first draft is written.

  2. Read that the token may write, that the creatable types resolve, and that the labels the status map names exist:

    revetly doctor
    
    [PASS] github: credential  GITHUB_TOKEN is set (<COUNT> chars)
    [PASS] github: repository  writes <OWNER>/<REPOSITORY>
    [PASS] github: creatable types  creates story -> '<NATIVE_TYPE_OR_LABEL>'
    [PASS] github: notes author  delivery notes will appear under GitHub account '<LOGIN>'
    

    If the organisation's Issue types read is missing, the adapter sends the native type unchecked and falls back to the mapped label on a 422, and raises the 422 where no label: mapping exists for that type.

  3. Show the calls a draft would make, without writing anything or reading the token:

    revetly backends rehearse github --project <PROJECT>
    
      would call  POST https://api.github.com/repos/<OWNER>/<REPOSITORY>/issues
                  {"title": "A rehearsal, not a story", "body": "<BODY>", "labels": ["story"]}
    

    Replace <PROJECT> with the key of the project whose GitHub write adapter you rehearse, or leave it off to rehearse the default project.

  1. Read the status map the write adapter uses, the line without the default: prefix:

    revetly doctor --offline
    
    [PASS] github: status map  draft = open + label draft; ready = open; in-progress = open + label in-progress; done = closed + completed/(no reason); parked = open + label parked; discarded = closed + not_planned/duplicate
    

    Replace the defaults with a [connectors.github.states] table where a status needs another state, reason or label — a bare state string only where it is distinguishable from the other entries, or a { state, reason, label } table, merged over the defaults, and two indistinguishable entries are refused.

Next steps