When set to Pull Request Mode, the GitHub Connector continuously monitors pull requests containing files within watched branches in GitHub. The pull request that triggers a translation Job (source pull request) is locked until translated files are delivered to GitHub. Translated files are delivered in a translation pull request created by the connector.
Tip: For more information on how the GitHub Connector works, read our Overview of the GitHub Connector.
How The GitHub Connector Handles History Changes
GitHub applies a unique identifier (SHA) to commits within pull requests. The SHA identifies the specific changes (who made them, when they were made, what files were impacted etc.), and this helps the GitHub Connector keep track of commits.
When a history change action is taken against one of the tracked pull requests, such as a rebase, the SHA's for all commits in the pull request change. This causes the GitHub Connector to reload the contents of that pull request and reflect the changes within Smartling. In other words, the files impacted by the history change are overwritten with the same changes as in GitHub.
- New content added to files in the source pull request in GitHub will be added to a new Job in Smartling or a current job, depending on the Job creation settings in your configuration set.
- This new Job may need to be authorized for translation manually if auto authorization is not enabled in your configuration set.
- Content or files removed in GitHub will be removed from the respective Jobs in Smartling.
- Unchanged content will remain unchanged in the original Job.
It is possible that some Jobs that were previously in progress or completed could return to “awaiting authorization” status and appear empty. The GitHub Connector will automatically cancel Empty Jobs.
Reloading content and cleaning existing jobs may take up to 20 minutes to reflect completely in Smartling.
Tip: Check the Job History to see if a history change in the pull request impacted a Job.
What Happens In GitHub
The GitHub Connector will look for translation pull requests already delivered back to GitHub from the source pull request.
- Any unmerged translation pull requests will be flagged as potentially outdated.
- These unmerged pull requests will be removed from the source pull request status checks that would otherwise prevent merging.
- This means you do not have to merge the outdated translation pull request to unlock the source pull request.
- Any merged translation pull requests will not be modified.
- The changes in these translation pull requests will either not need modification or will be modified by a future translation pull request based on the current files in the source pull request.
The modification to the unmerged translation pull request serves to notify you that changes within this pull request may be out of date. The updated pull request description contains links to the latest relevant translation Jobs in Smartling, so you can view the impacted strings in the Job history if desired. The outdated translation pull request can then be ignored or deleted.
Example modification of pull requests in GitHub