Skip to content

Commit

Permalink
fix mirroring to UW org
Browse files Browse the repository at this point in the history
  • Loading branch information
PhotoNomad0 committed Sep 4, 2024
1 parent 87ff68a commit 2ed0745
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tc-source-content-updater",
"version": "1.4.27",
"version": "1.4.28-beta.2",
"description": "Module that updates source content for the desktop application translationCore.",
"main": "lib/index.js",
"display": "library",
Expand Down
13 changes: 9 additions & 4 deletions src/helpers/apiHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,15 @@ function filterOutMasterBranch(catalog, ignoredResources = [], newCatalog = [])
if (sourceResource) {
const _tagName = sourceResource.branch_or_tag_name;
if (isValidVersionTag(_tagName)) {
// copy latest release data from source
resource.branch_or_tag_name = _tagName;
resource.released = sourceResource.released;
resource.modified = sourceResource.modified;
// mirror from unfoldingWord repo
const originalOwner = resource.owner;
const originalFullName = resource.full_name;
for (const key of Object.keys(sourceResource)) {
resource[key] = sourceResource[key];
}
// restore original owner
resource.owner = originalOwner;
resource.full_name = originalFullName;
return true;
}
}
Expand Down

0 comments on commit 2ed0745

Please sign in to comment.