This repository was archived by the owner on Jul 16, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Create Repositories Table and Implement Background Syncing Job #48
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
7d82a21
Add repos table
codersquirrelbln 9a6ee06
Bring repos into db
codersquirrelbln 9ab9a4e
Add sidekiq and background job for syncing repos in database
codersquirrelbln db85230
Add application to stylesheet
codersquirrelbln b5e0857
Uncomment css_compressor in application config
codersquirrelbln 2264e2a
Add link_directory JS to manifest
codersquirrelbln 9f68d02
Fix migration files
codersquirrelbln 277424e
Adjust ci pipeline -wip
codersquirrelbln e16b65e
Add eslint gem
codersquirrelbln 40c1cae
Merge branch 'main' into create-repos-table
codersquirrelbln 76856a6
Add repo sync service
codersquirrelbln 7c65343
Improve repo fetching via api or db
codersquirrelbln 399f4da
Update yarn integrity
codersquirrelbln 4d00341
Adjust campaigns and repository associations and views
codersquirrelbln 5c04162
fix user associations
codersquirrelbln af6cc08
Merge branch 'main' into create-repos-table
codersquirrelbln e1c469a
Remove yarn from ci pipeline
codersquirrelbln 67a79ab
Merge branch 'main' into create-repos-table
codersquirrelbln 4c98445
Fixing tests
codersquirrelbln ee7c51b
Adjust routes and slim down campaigns controller
codersquirrelbln e70a1f6
Refactor sync repos service
codersquirrelbln 1b66d17
Remove json format in home controller and remove registrations contro…
codersquirrelbln 4c47ba5
campaigns form WIP
codersquirrelbln a7cbf53
Debugging currencies format
codersquirrelbln 50c4570
Merge branch 'main' into create-repos-table
codersquirrelbln 3f579e6
Fix campaign show UX
codersquirrelbln cf13768
fix button select toggle
codersquirrelbln 15c4109
Fix campaign edit currencies
codersquirrelbln 3e0e2c6
Fix button bug
codersquirrelbln 4fbac27
Fix tests
codersquirrelbln 269ef38
Fix currencies update problem
codersquirrelbln bb21642
Fix accepted currencies update
codersquirrelbln b6b3011
Fix authentication for campaigns
codersquirrelbln File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,24 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| class RepositoriesController < ApplicationController | ||
| before_action :authenticate_user!, only: %i[index show] | ||
|
|
||
| def index | ||
| @repositories = current_user.repositories.includes(:campaigns) | ||
| # prepare_campaigns_mapping | ||
| end | ||
|
|
||
| private | ||
|
|
||
| def prepare_campaigns_mapping | ||
| repository_ids = @repositories.pluck(:id) | ||
|
|
||
| campaigns = Campaign.where(repository_id: repository_ids) | ||
| @campaigns_by_repository_id = campaigns.index_by(&:repository_id) | ||
| logger.debug "Campaigns by Repo Identifier: #{@campaigns_by_repository_id.inspect}" | ||
|
|
||
| @respositories_with_campaigns = @repositories.map do |repository| | ||
| { repository:, campaign: @campaigns_by_repository_id[repository.id] } | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.