rubyforgood / rubyforgood/skillrx-beacon

Entities sync service

Open
#25 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cross-app sync
Dominant language
HTML
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Replicate providers, topics, tags from manifest using external IDs

ContentProviderSync:

  class ContentProviderSync
    def sync(provider_data)
      ContentProvider.find_or_initialize_by(external_id: provider_data["id"]).tap do |p|
        p.update!(name: provider_data["name"])
      end
    end
  end

TopicSync:

  class TopicSync
    def sync(topic_data, content_provider)
      Topic.find_or_initialize_by(external_id: topic_data["id"]).tap do |t|
        t.update!(
          content_provider: content_provider,
          title: topic_data["name"],
          # map other fields...
        )
        sync_tags(t, topic_data["tag_ids"])
      end
    end
  end

TagSync:

  class TagSync
    def sync(tag_data)
      Tag.find_or_initialize_by(external_id: tag_data["id"]).tap do |t|
        t.update!(name: tag_data["name"])
      end
    end
  end

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the ContentProviderSync, TopicSync, and TagSync entry points and the manifest data they consume. Trace the existing ContentProvider, Topic, and Tag models to identify the fields and tag relationships that must be synchronized by external ID. Done means providers, topics, and tags can be replicated from the manifest without creating duplicates, including topic tags.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.