Integrations

GitHub (Strings)

Content is machine translated from English by Phrase Language AI.

Tip

For information about GitHub integration in Phrase TMS, refer to GitHub (TMS).

Prerequisites

  • The .phrase.yml configuration file must be present in the root of the branch to be monitored. The file defines which files to import (pull) or export (push) from the repository.

  • Read and write access are required for the repository.

  • Incorrectly defined configuration files may cause errors. Ensure that the file contains at least one push and one pull target, correct file formats and the correct setting of the update_translations parameter.

  • A GitHub access token for the scope of the repository (public_repo if synchronizing with a public repository).

  • If SSO is enabled in GitHub, it must also be enabled for the access token.

  • The phrase_translations branch cannot be protected.

  • Ensure repository settings do not require signed commits.

Note

Due to continuous improvements, the user interface may not be exactly the same as presented in the video.

Connect Repositories

Once the configuration file is in place, to connect a repository, follow these steps:

  1. From the Integrations page, scroll down to the GitHub Sync connector and click Configure.

    The Repo Syncs page opens.

  2. Click Add Sync/GitHub.

    The GitHub sync settings window opens.

  3. Select a project from the dropdown list.

  4. Optionally select Self-hosted instance and provide the GitHub self-hosted API endpoint.

  5. Provide a personal Repo access token with an API scope.

  6. Select a GitHub repository from the dropdown list.

  7. Select a Repository branch from the dropdown list to import (push) and export (pull) from. This is usually the master branch.

  8. Click Validate Configuration to ensure access token and configuration file are correct.

  9. Optionally select Auto import to import files with every commit to the selected GitHub branch.

  10. Click Save.

    The project is now connected to the selected GitHub repository and added to the list.

Import Files

To import files:

  • From the Repo Syncs page, select a project and click Import.

    Language files (defined as push source entries in the configuration file) are imported into the project.

    A default locale must be present.

    Note

    In case of issues upon importing, use the CLI client to test the .phrase.yml configuration file locally and check for any error messages.

    If required, contact Phrase Technical Support and attach the .phrase.yml configuration file to the support request.

Export Files

To export files:

  1. From the Repo Syncs page, select a project and click Export.

    The most recent language files in the repository are exported as a new pull request.

  2. Once files are exported, the pull request can be merged or closed in the repository and the branch can be deleted.

Note

In case of issues upon exporting, use the CLI client to test the .phrase.yml configuration file locally and check for any error messages.

If required, contact Phrase Technical Support and attach the .phrase.yml configuration file to the support request.

History

Repo syncs keep a history of the latest imports and exports for each Phrase Strings project.

To view the history:

  • From the Repo Syncs page, select a project and click History.

    The import and export history for the project is presented. Export entries in the history include a link to the corresponding merge request.

Was this article helpful?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.