Skip to content
HelpWell

Connect more than one GitHub repository

A hosted product can sync from several GitHub repositories into one help center. Each repository keeps its own connection, files and sync status.

#What you get

  • Each repository's files sit in their own place in the knowledge base, so repositories don't overwrite each other.
  • A sync removes only the files that came from its own repository.
  • A push to a repository is routed to that repository's connection.
  • Edits made in HelpWell are sent back as one pull request per repository.
  • If a repository fails, the failure reaches your admins. Each connection records its own status and last error.

If your product already had one GitHub connection, it stays as it was. Its token, webhook secret, synced files and sync log are kept.

#Where each repository's files go

The first repository stays at the top level of the knowledge base. Its paths are unchanged.

Every other repository gets a folder name taken from the repository name. The owner is dropped, the name is lowercased, and characters other than letters and numbers become hyphens.

RepositoryFolder name
acme/acme-appacme-app
acme/My_API.v2my-api-v2

For a repository with the folder name api, paths map like this:

In the repositoryIn the knowledge base
guides/start.mdapi-guides/start.md
guides/_meta.jsonapi-guides/_meta.json
overview.mdapi/overview.md

The folder name is added to the top-level folder of each file. A file at the root of the repository goes into a folder named after the repository.

A path that doesn't carry the repository's prefix, such as guides/start.md in the knowledge base, doesn't belong to that repository. Syncing the api repository leaves it alone.

When files move between the repository layout and the knowledge base layout, HelpWell rewrites relative image links so they still work. In the api example, ../_screenshots/home.png becomes ../api-_screenshots/home.png. Rewriting runs in both directions, so edits you send back to the repository keep the original links.

These links are left as they are:

  • Links to an image in the same folder, such as ./local.png
  • Image links inside code blocks
  • Absolute URLs, such as https://example.test/a.png

Note

The folder name comes from the repository name. Check where a second repository's files land before you link to them from other articles.

Was this article helpful?