Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for importing collections #7

Merged
merged 2 commits into from
Dec 7, 2023

Conversation

JiriLojda
Copy link
Member

Motivation

Which issue does this fix? Fixes #issue number

If no issue exists, what is the fix or new feature? Were there any reasons to fix/implement things that are not obvious?

Checklist

  • Code follows coding conventions held in this repo
  • Automated tests have been added
  • Tests are passing
  • Docs have been updated (if applicable)
  • Temporary settings (e.g. variables used during development and testing) have been reverted to defaults

How to test

If manual testing is required, what are the steps?

@JiriLojda JiriLojda requested a review from a team as a code owner December 4, 2023 14:50
This was referenced Dec 6, 2023
"match" in matchResult && !!matchResult.match;

const matchCollections = (fileCollection: Collection, projectCollection: Collection): MatchResult => {
const hasSameCollection = fileCollection.codename === projectCollection.codename;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasSameCollectionCodename or hasSameCodename

throw new Error(`Cannot import collections due to errors: ${matchErrors.map(e => `"${e.error}"`).join(", ")}.`);
}
const collectionsToUpdate = matchResults.filter(isMatch);
const collectionsToAdd = fileCollections
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should go consistent in naming and use it in every entity then.. will we use fileCollections or importCollections? I like import a little better, however it might be personal preference.. what do you think? :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave fileCollections for now as I have file... naming everywhere. We can discuss the naming later and rename it.

@JiriLojda JiriLojda force-pushed the DEVREL-1076_import_collections branch from 90f37f0 to 063a138 Compare December 7, 2023 09:45
@JiriLojda JiriLojda merged commit ea884b7 into main Dec 7, 2023
1 check passed
@JiriLojda JiriLojda deleted the DEVREL-1076_import_collections branch December 7, 2023 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants