Skip to main content
All CollectionsCompanyDevelopers
How does Lingohub avoid empty pull requests
How does Lingohub avoid empty pull requests
Updated this week

Suppose you push files to a repository branch, either manually or on a scheduled basis, by using the “Create a pull request” feature. In that case, the situation is quite often that the data in Lingohub did not change compared to the last version of the backed repository branch. As a result, there are no differences between the exported files and the files in the repository. Therefore, the commit would be empty, as well as the associated Pull request.

To avoid such empty commits and Pull requests, Lingohub has implemented the following strategy:

  • You choose to Push your files by using the "Create a pull request" feature to branch lingohub_language_update_{base_branch}_{date} (or any other defined and non-existing branch) having branch main as the base.

  • After this, Lingohub creates the branch lingohub_language_update_{base_branch}_{date} and commits & pushes all exported files to that branch.

  • Now Lingohub uses the Repository API features to create a diff between branch lingohub_language_update_{base_branch}_{date} and the base branch main.

  • If the diff is empty (so no changes have been detected between your base branch and the branch is created for that PR push), Lingohub will delete the branch lingohub_language_update_{base_branch}_{date} as long the branch has been created by Lingohub for this export.

  • The status of the resource export will be set to "SKIPPED."

Awesome! You have finished the article. If you have any questions, please contact our team at [email protected].

Did this answer your question?